workspace: Do not call set_active when deserializing a dock if that dock was not visible (#27852)
This unblocks work on new debugger UI, where we don't want the set_active function to be called unconditionally. Release Notes: - N/A --------- Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This commit is contained in:
parent
7257053df4
commit
992831ceb6
1 changed files with 1 additions and 1 deletions
|
@ -565,7 +565,7 @@ impl Dock {
|
|||
|
||||
pub fn restore_state(&mut self, window: &mut Window, cx: &mut Context<Self>) -> bool {
|
||||
if let Some(serialized) = self.serialized_dock.clone() {
|
||||
if let Some(active_panel) = serialized.active_panel {
|
||||
if let Some(active_panel) = serialized.active_panel.filter(|_| serialized.visible) {
|
||||
if let Some(idx) = self.panel_index_for_persistent_name(active_panel.as_str(), cx) {
|
||||
self.activate_panel(idx, window, cx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue