mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Don't write global script class information if there is none
This commit is contained in:
parent
9b1c9cef17
commit
3163611f0c
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user