Don't mark settings as modified while loading
This commit is contained in:
parent
1bd740d18d
commit
84e8831b89
|
@ -65,7 +65,7 @@ bool EditorSettings::_set(const StringName &p_name, const Variant &p_value) {
|
|||
_THREAD_SAFE_METHOD_
|
||||
|
||||
bool changed = _set_only(p_name, p_value);
|
||||
if (changed) {
|
||||
if (changed && initialized) {
|
||||
changed_settings.insert(p_name);
|
||||
emit_signal(SNAME("settings_changed"));
|
||||
}
|
||||
|
@ -330,6 +330,10 @@ bool EditorSettings::has_default_value(const String &p_setting) const {
|
|||
return props[p_setting].has_default_value;
|
||||
}
|
||||
|
||||
void EditorSettings::_set_initialized() {
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||
_THREAD_SAFE_METHOD_
|
||||
// Sets up the editor setting with a default value and hint PropertyInfo.
|
||||
|
@ -1927,7 +1931,5 @@ EditorSettings::EditorSettings() {
|
|||
last_order = 0;
|
||||
|
||||
_load_defaults();
|
||||
}
|
||||
|
||||
EditorSettings::~EditorSettings() {
|
||||
callable_mp(this, &EditorSettings::_set_initialized).call_deferred();
|
||||
}
|
||||
|
|
|
@ -98,6 +98,7 @@ private:
|
|||
|
||||
bool save_changed_setting = true;
|
||||
bool optimize_save = true; //do not save stuff that came from config but was not set from engine
|
||||
bool initialized = false;
|
||||
|
||||
bool _set(const StringName &p_name, const Variant &p_value);
|
||||
bool _set_only(const StringName &p_name, const Variant &p_value);
|
||||
|
@ -108,6 +109,7 @@ private:
|
|||
bool _property_can_revert(const StringName &p_name) const;
|
||||
bool _property_get_revert(const StringName &p_name, Variant &r_property) const;
|
||||
|
||||
void _set_initialized();
|
||||
void _load_defaults(Ref<ConfigFile> p_extra_config = Ref<ConfigFile>());
|
||||
void _load_godot2_text_editor_theme();
|
||||
void _load_default_visual_shader_editor_theme();
|
||||
|
@ -196,7 +198,6 @@ public:
|
|||
#endif
|
||||
|
||||
EditorSettings();
|
||||
~EditorSettings();
|
||||
};
|
||||
|
||||
//not a macro any longer
|
||||
|
|
Loading…
Reference in New Issue