fix(panes): closing a stacked pane should relayout (#2312)

This commit is contained in:
Aram Drevekenin 2023-03-20 17:54:47 +01:00 committed by GitHub
parent bef3c9c89d
commit 44abfc9a16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2202,12 +2202,7 @@ impl Tab {
let closed_pane = self.tiled_panes.remove_pane(id);
self.set_force_render();
self.tiled_panes.set_force_render();
let closed_pane_is_stacked = closed_pane
.as_ref()
.map(|p| p.position_and_size().is_stacked)
.unwrap_or(false);
if self.auto_layout && !self.swap_layouts.is_tiled_damaged() && !closed_pane_is_stacked
{
if self.auto_layout && !self.swap_layouts.is_tiled_damaged() {
self.swap_layouts.set_is_tiled_damaged();
// only relayout if the user is already "in" a layout, otherwise this might be
// confusing