panel: Fix panel to unexpected size chagnes when moved some panel. (#506)

### Before 



https://github.com/user-attachments/assets/9174033b-d901-412f-9176-cdef6438822f
This commit is contained in:
Jason Lee 2024-12-20 19:15:31 +08:00 committed by GitHub
parent 57c1da2441
commit 28463d3a18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -338,6 +338,7 @@ impl ResizablePanel {
fn update_size(&mut self, bounds: Bounds<Pixels>, cx: &mut ViewContext<Self>) {
let new_size = bounds.size.along(self.axis);
self.bounds = bounds;
self.size_ratio = None;
self.size = Some(new_size);
let entity_id = cx.view().entity_id();