Prevent unsaved inherited scenes from being detected as the 'placeholder' scene

This commit is contained in:
MinusKube 2022-09-16 02:09:54 +02:00
parent c2babb6558
commit 5f8293db54

View file

@ -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--;
}