From 0f6327b59b07a3b689f99b2f5533e6ebc801bad4 Mon Sep 17 00:00:00 2001 From: trollodel <33117082+trollodel@users.noreply.github.com> Date: Sat, 22 Jul 2023 17:24:47 +0200 Subject: [PATCH] Make the single window mode check more strict Check the "interface/editor/single_window_mode" editor settings. --- editor/editor_node.cpp | 2 +- editor/window_wrapper.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 38a0005cedc..c8e2adf2b37 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -7196,7 +7196,7 @@ EditorNode::EditorNode() { dock_select->set_v_size_flags(Control::SIZE_EXPAND_FILL); dock_vb->add_child(dock_select); - if (!SceneTree::get_singleton()->get_root()->is_embedding_subwindows() && EDITOR_GET("interface/multi_window/enable")) { + if (!SceneTree::get_singleton()->get_root()->is_embedding_subwindows() && !EDITOR_GET("interface/editor/single_window_mode") && EDITOR_GET("interface/multi_window/enable")) { dock_float = memnew(Button); dock_float->set_icon(theme->get_icon("MakeFloating", "EditorIcons")); dock_float->set_text(TTR("Make Floating")); diff --git a/editor/window_wrapper.cpp b/editor/window_wrapper.cpp index 3a8dbf017fc..91d5aa8860d 100644 --- a/editor/window_wrapper.cpp +++ b/editor/window_wrapper.cpp @@ -313,7 +313,7 @@ void WindowWrapper::set_margins_enabled(bool p_enabled) { } WindowWrapper::WindowWrapper() { - if (SceneTree::get_singleton()->get_root()->is_embedding_subwindows() || !EDITOR_GET("interface/multi_window/enable")) { + if (SceneTree::get_singleton()->get_root()->is_embedding_subwindows() || EDITOR_GET("interface/editor/single_window_mode") || !EDITOR_GET("interface/multi_window/enable")) { return; }