From 51923fc528fe2342fb27d64c1389641ecdb0c777 Mon Sep 17 00:00:00 2001 From: Hrvoje Varga Date: Thu, 27 Jul 2023 07:38:40 +0200 Subject: [PATCH] Fix scene tab close --- editor/editor_node.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b81d4aac88f..07d78ab9ab8 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3617,7 +3617,9 @@ void EditorNode::set_current_scene(int p_idx) { _update_title(); _update_scene_tabs(); - call_deferred(SNAME("_set_main_scene_state"), state, get_edited_scene()); // Do after everything else is done setting up. + if (tabs_to_close.is_empty()) { + call_deferred(SNAME("_set_main_scene_state"), state, get_edited_scene()); // Do after everything else is done setting up. + } } void EditorNode::setup_color_picker(ColorPicker *p_picker) {