From 5f8293db54efb24051b32c16700ac05349c05cb9 Mon Sep 17 00:00:00 2001 From: MinusKube Date: Fri, 16 Sep 2022 02:09:54 +0200 Subject: [PATCH] Prevent unsaved inherited scenes from being detected as the 'placeholder' scene --- editor/editor_node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 8eaddcb7e16..5a5c6310e17 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3751,7 +3751,7 @@ int EditorNode::new_scene() { if (editor_data.get_edited_scene_count() > 1) { for (int i = 0; i < editor_data.get_edited_scene_count() - 1; i++) { bool unsaved = get_undo_redo()->is_history_unsaved(editor_data.get_scene_history_id(i)); - if (!unsaved && editor_data.get_scene_path(i).is_empty()) { + if (!unsaved && editor_data.get_scene_path(i).is_empty() && editor_data.get_edited_scene_root(i) == nullptr) { editor_data.remove_scene(i); idx--; }