Skip to content

armgit / godot

Public Imported from GitHub
0

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

only save editor settings to disk when a setting has been changed

Goldenlion5648be05253fea8a
diff --git a/editor/settings/editor_settings.cpp b/editor/settings/editor_settings.cpp
index b4294d5f454..db26df50c57 100644
--- a/editor/settings/editor_settings.cpp
+++ b/editor/settings/editor_settings.cpp
@@ -1560,9 +1560,14 @@ void EditorSettings::save() {
if (!singleton.ptr()) {
return;
}
+ // Only save if a setting has been changed or
+ // the setting file for this version does not exist yet.
+ // Fixes issues when multiple editor instances are open.
+ if (singleton->changed_settings.is_empty() && FileAccess::exists(singleton->get_path())) {
+ return;
+ }
Error err = ResourceSaver::save(singleton);
-
if (err != OK) {
ERR_PRINT("Error saving editor settings to " + singleton->get_path());
} else {