Remove focus side effects from toggle dock commands
co-authored-by: max <max@zed.dev>
This commit is contained in:
parent
1a23fe91b4
commit
9c9af5ed94
2 changed files with 70 additions and 14 deletions
|
@ -201,7 +201,7 @@ impl Dock {
|
|||
self.active_panel_index
|
||||
}
|
||||
|
||||
pub fn set_open(&mut self, open: bool, cx: &mut ViewContext<Self>) {
|
||||
pub(crate) fn set_open(&mut self, open: bool, cx: &mut ViewContext<Self>) {
|
||||
if open != self.is_open {
|
||||
self.is_open = open;
|
||||
if let Some(active_panel) = self.panel_entries.get(self.active_panel_index) {
|
||||
|
@ -212,11 +212,6 @@ impl Dock {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn toggle_open(&mut self, cx: &mut ViewContext<Self>) {
|
||||
self.set_open(!self.is_open, cx);
|
||||
cx.notify();
|
||||
}
|
||||
|
||||
pub fn set_panel_zoomed(
|
||||
&mut self,
|
||||
panel: &AnyViewHandle,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue