From c15e04cc4363fe86c38ca3628ede1fa4fef6faf1 Mon Sep 17 00:00:00 2001 From: kobewi Date: Mon, 8 Dec 2025 23:19:05 +0100 Subject: [PATCH] Fix bottom panel pinning --- editor/docks/editor_dock_manager.cpp | 8 ++++++-- editor/gui/editor_bottom_panel.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/editor/docks/editor_dock_manager.cpp b/editor/docks/editor_dock_manager.cpp index 937905d11a8..4c1423d960d 100644 --- a/editor/docks/editor_dock_manager.cpp +++ b/editor/docks/editor_dock_manager.cpp @@ -866,7 +866,7 @@ void EditorDockManager::focus_dock(EditorDock *p_dock) { } if (!p_dock->is_open) { - open_dock(p_dock); + open_dock(p_dock, false); } if (p_dock->dock_window) { @@ -874,7 +874,11 @@ void EditorDockManager::focus_dock(EditorDock *p_dock) { return; } - if (!docks_visible && p_dock->get_parent() != EditorNode::get_bottom_panel()) { + if (p_dock->get_parent() == EditorNode::get_bottom_panel()) { + if (EditorNode::get_bottom_panel()->is_locked()) { + return; + } + } else if (!docks_visible) { return; } diff --git a/editor/gui/editor_bottom_panel.h b/editor/gui/editor_bottom_panel.h index 523f8aacfd7..238ed5e6c37 100644 --- a/editor/gui/editor_bottom_panel.h +++ b/editor/gui/editor_bottom_panel.h @@ -77,6 +77,7 @@ public: void toggle_last_opened_bottom_panel(); void set_expanded(bool p_expanded); void _theme_changed(); + bool is_locked() const { return lock_panel_switching; } void set_bottom_panel_offset(int p_offset); int get_bottom_panel_offset();