Added side bar restoration
This commit is contained in:
parent
8a48567857
commit
b8d423555b
3 changed files with 28 additions and 7 deletions
|
@ -2340,6 +2340,7 @@ impl Workspace {
|
|||
dock_position: self.dock.position(),
|
||||
dock_pane,
|
||||
center_group,
|
||||
project_panel_open: self.left_sidebar.read(cx).is_open(),
|
||||
};
|
||||
|
||||
cx.background()
|
||||
|
@ -2383,6 +2384,12 @@ impl Workspace {
|
|||
// Swap workspace center group
|
||||
workspace.center = PaneGroup::with_root(root);
|
||||
|
||||
// Note, if this is moved after 'set_dock_position'
|
||||
// it causes an infinite loop.
|
||||
if serialized_workspace.project_panel_open {
|
||||
workspace.toggle_sidebar_item_focus(SidebarSide::Left, 0, cx)
|
||||
}
|
||||
|
||||
Dock::set_dock_position(workspace, serialized_workspace.dock_position, cx);
|
||||
|
||||
if let Some(active_pane) = active_pane {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue