summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2021-02-13 18:40:58 +0100
committerkobewi <kobewi4e@gmail.com>2021-02-13 18:51:48 +0100
commit4db47eb32e550fb1f2d8967907b66b2d41f09050 (patch)
tree4ecec543415276696c43a59bf01ad18d7082a89d /editor
parent7128f09a5d9f00b7f8326c7f6bc540309da3e8b6 (diff)
Don't save project settings when not necessary
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_data.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 18364dc32f..213c3f5631 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -942,6 +942,14 @@ void EditorData::script_class_save_icon_paths() {
}
}
+ Dictionary old;
+ if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) {
+ old = ProjectSettings::get_singleton()->get("_global_script_class_icons");
+ }
+ if ((!old.is_empty() || d.is_empty()) && d.hash() == old.hash()) {
+ return;
+ }
+
if (d.is_empty()) {
if (ProjectSettings::get_singleton()->has_setting("_global_script_class_icons")) {
ProjectSettings::get_singleton()->clear("_global_script_class_icons");