summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/script_language.cpp6
-rw-r--r--editor/editor_data.cpp6
2 files changed, 10 insertions, 2 deletions
diff --git a/core/script_language.cpp b/core/script_language.cpp
index b63aeb952c..bb2e9a07ff 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -275,7 +275,11 @@ void ScriptServer::save_global_classes() {
gcarr.push_back(d);
}
- ProjectSettings::get_singleton()->set("_global_script_classes", gcarr);
+ if (gcarr.empty()) {
+ ProjectSettings::get_singleton()->clear("_global_script_classes");
+ } else {
+ ProjectSettings::get_singleton()->set("_global_script_classes", gcarr);
+ }
ProjectSettings::get_singleton()->save();
}
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 5118ccacad..7537c86676 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -936,7 +936,11 @@ void EditorData::script_class_save_icon_paths() {
}
}
- ProjectSettings::get_singleton()->set("_global_script_class_icons", d);
+ if (d.empty()) {
+ ProjectSettings::get_singleton()->clear("_global_script_class_icons");
+ } else {
+ ProjectSettings::get_singleton()->set("_global_script_class_icons", d);
+ }
ProjectSettings::get_singleton()->save();
}