From de1d2acec24ff97bb4f3f19a663de7a32e2cfa1a Mon Sep 17 00:00:00 2001 From: kobewi Date: Sat, 3 Jan 2026 22:50:30 +0100 Subject: [PATCH] Don't open new scene when double-clicking tabs --- editor/scene/editor_scene_tabs.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/editor/scene/editor_scene_tabs.cpp b/editor/scene/editor_scene_tabs.cpp index 97f909bda6..764052a72b 100644 --- a/editor/scene/editor_scene_tabs.cpp +++ b/editor/scene/editor_scene_tabs.cpp @@ -128,7 +128,7 @@ void EditorSceneTabs::_scene_tab_input(const Ref &p_input) { Ref mb = p_input; if (mb.is_valid()) { - if (mb->get_button_index() == MouseButton::LEFT && mb->is_double_click()) { + if (scene_tabs->get_hovered_tab() < 0 && mb->get_button_index() == MouseButton::LEFT && mb->is_double_click()) { int tab_buttons = 0; if (scene_tabs->get_offset_buttons_visible()) { tab_buttons = get_theme_icon(SNAME("increment"), SNAME("TabBar"))->get_width() + get_theme_icon(SNAME("decrement"), SNAME("TabBar"))->get_width(); @@ -137,8 +137,7 @@ void EditorSceneTabs::_scene_tab_input(const Ref &p_input) { if ((is_layout_rtl() && mb->get_position().x > tab_buttons) || (!is_layout_rtl() && mb->get_position().x < scene_tabs->get_size().width - tab_buttons)) { EditorNode::get_singleton()->trigger_menu_option(EditorNode::SCENE_NEW_SCENE, true); } - } - if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) { + } else if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) { // Context menu. _update_context_menu();