panel: Toggle to zoom out when close a panel. (#322)

This commit is contained in:
Jason Lee 2024-10-08 18:09:41 +08:00 committed by GitHub
parent 4fd233ae6b
commit 45d4b445ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -238,6 +238,7 @@ impl TabPanel {
pub fn remove_panel(&mut self, panel: Arc<dyn PanelView>, cx: &mut ViewContext<Self>) {
self.detach_panel(panel, cx);
self.remove_self_if_empty(cx);
cx.emit(PanelEvent::ZoomOut);
cx.emit(PanelEvent::LayoutChanged);
}