Skip to content

Commit cac9651

Browse files
committed
Fix docks not updating tab styles
1 parent 7ed0b61 commit cac9651

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

editor/docks/editor_dock_manager.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -703,26 +703,21 @@ void EditorDockManager::load_docks_from_config(Ref<ConfigFile> p_layout, const S
703703
dock->load_layout_from_config(p_layout, section_name);
704704
continue;
705705
}
706+
706707
if (allow_floating_docks && floating_docks_dump.has(name)) {
707708
_restore_dock_to_saved_window(dock, floating_docks_dump[name]);
708-
} else if (i >= 0) {
709-
if (dock->transient && !dock->is_open) {
710-
dock->dock_slot_index = i;
711-
} else {
712-
_move_dock(dock, dock_slots[i].container, 0);
713-
}
714-
}
715-
dock->load_layout_from_config(p_layout, section_name);
716-
717-
if (!dock->transient) {
709+
} else if (i >= 0 && !(dock->transient && !dock->is_open)) {
710+
// Safe to include transient open docks here because they won't be in the closed dock dump.
718711
if (closed_docks.has(name)) {
719-
_move_dock(dock, closed_dock_parent);
720712
dock->is_open = false;
721713
dock->hide();
714+
_move_dock(dock, closed_dock_parent);
722715
} else {
723716
dock->is_open = true;
717+
_move_dock(dock, dock_slots[i].container, 0);
724718
}
725719
}
720+
dock->load_layout_from_config(p_layout, section_name);
726721

727722
dock->dock_slot_index = i;
728723
dock->previous_tab_index = i >= 0 ? j : 0;

0 commit comments

Comments
 (0)