Skip to content

Commit 7dac0bc

Browse files
committed
Merge pull request #115839 from SpikeTrapBoomStudios/make-editor-docks-respect-pin-behavior
Fix: Skip setting current dock when tab cannot switch [ Make EditorDocks respect panel lock ]
2 parents a662390 + a66742d commit 7dac0bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

editor/docks/editor_dock_manager.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,12 +607,13 @@ void EditorDockManager::open_dock(EditorDock *p_dock, bool p_set_current) {
607607

608608
// Open dock to its previous location.
609609
if (p_dock->dock_slot_index != EditorDock::DOCK_SLOT_NONE) {
610-
TabContainer *slot = dock_slots[p_dock->dock_slot_index];
610+
DockTabContainer *slot = dock_slots[p_dock->dock_slot_index];
611611
int tab_index = p_dock->previous_tab_index;
612612
if (tab_index < 0) {
613613
tab_index = slot->get_tab_count();
614614
}
615-
_move_dock(p_dock, slot, tab_index, p_set_current);
615+
616+
_move_dock(p_dock, slot, tab_index, p_set_current && slot->can_switch_dock());
616617
} else {
617618
_open_dock_in_window(p_dock, true, true);
618619
return;

0 commit comments

Comments
 (0)