Fix bug on workspace deserialization
This commit is contained in:
parent
b9cb594626
commit
b7e3ac5bf4
1 changed files with 13 additions and 2 deletions
|
@ -3045,11 +3045,14 @@ impl Workspace {
|
||||||
if let Some(ix) = dock.panel_index_for_ui_name(&active_panel, cx) {
|
if let Some(ix) = dock.panel_index_for_ui_name(&active_panel, cx) {
|
||||||
dock.activate_panel(ix, cx);
|
dock.activate_panel(ix, cx);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
dock.active_panel()
|
dock.active_panel()
|
||||||
.map(|panel| {
|
.map(|panel| {
|
||||||
panel.set_zoomed(docks.left.zoom, cx)
|
panel.set_zoomed(docks.left.zoom, cx)
|
||||||
});
|
});
|
||||||
}
|
if docks.left.visible && docks.left.zoom {
|
||||||
|
cx.focus_self()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// TODO: I think the bug is that setting zoom or active undoes the bottom zoom or something
|
// TODO: I think the bug is that setting zoom or active undoes the bottom zoom or something
|
||||||
workspace.right_dock.update(cx, |dock, cx| {
|
workspace.right_dock.update(cx, |dock, cx| {
|
||||||
|
@ -3059,11 +3062,15 @@ impl Workspace {
|
||||||
dock.activate_panel(ix, cx);
|
dock.activate_panel(ix, cx);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
dock.active_panel()
|
dock.active_panel()
|
||||||
.map(|panel| {
|
.map(|panel| {
|
||||||
panel.set_zoomed(docks.right.zoom, cx)
|
panel.set_zoomed(docks.right.zoom, cx)
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
if docks.right.visible && docks.right.zoom {
|
||||||
|
cx.focus_self()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
workspace.bottom_dock.update(cx, |dock, cx| {
|
workspace.bottom_dock.update(cx, |dock, cx| {
|
||||||
dock.set_open(docks.bottom.visible, cx);
|
dock.set_open(docks.bottom.visible, cx);
|
||||||
|
@ -3077,6 +3084,10 @@ impl Workspace {
|
||||||
.map(|panel| {
|
.map(|panel| {
|
||||||
panel.set_zoomed(docks.bottom.zoom, cx)
|
panel.set_zoomed(docks.bottom.zoom, cx)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if docks.bottom.visible && docks.bottom.zoom {
|
||||||
|
cx.focus_self()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue