You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-19 14:31:59 +00:00
ProjectSettings add dirty flag and project_settings_changed signal
Most frames there will be no change in project settings, and it makes no sense to read settings every frame in case of changes, as a large number of string compares are involved. This PR adds a signal to ProjectSettings that can be subscribed to in order to keep local settings up to date with ProjectSettings. In addition a function `ProjectSettings::has_changes()` is provided for objects outside the signal system (e.g. Rasterizers).
This commit is contained in:
@@ -99,8 +99,8 @@ void ImportDefaultsEditor::_save() {
|
||||
} else {
|
||||
ProjectSettings::get_singleton()->set("importer_defaults/" + settings->importer->get_importer_name(), Variant());
|
||||
}
|
||||
|
||||
emit_signal("project_settings_changed");
|
||||
// Calling ProjectSettings::set() causes the signal "project_settings_changed" to be sent to ProjectSettings.
|
||||
// ProjectSettingsEditor subscribes to this and can reads the settings updated here.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user