Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix "Ignore external changes" overwriting other scenes with the current one

CalBebop46fd6f224069
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 2fb514cdada..25988e0ae41 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1626,7 +1626,7 @@ void EditorNode::_scan_external_changes() {
TreeItem *ti = disk_changed_list->create_item(r);
ti->set_text(0, scene_path.get_file());
need_reload = true;
- disk_changed_scenes.push_back(scene_path);
+ disk_changed_scenes.insert(scene_path);
}
}
@@ -1644,9 +1644,7 @@ void EditorNode::_scan_external_changes() {
}
void EditorNode::_resave_externally_modified_scenes(String p_str) {
- for (const String &scene_path : disk_changed_scenes) {
- _save_scene(scene_path);
- }
+ save_scene_list(disk_changed_scenes);
if (disk_changed_project) {
ProjectSettings::get_singleton()->save();
diff --git a/editor/editor_node.h b/editor/editor_node.h
index 59825e8c26b..2a95f25af56 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -439,7 +439,7 @@ private:
EditorBottomPanel *bottom_panel = nullptr;
Tree *disk_changed_list = nullptr;
- LocalVector<String> disk_changed_scenes;
+ HashSet<String> disk_changed_scenes;
bool disk_changed_project = false;
ConfirmationDialog *disk_changed = nullptr;
ConfirmationDialog *project_data_missing = nullptr;