diff options
| author | volzhs | 2018-01-08 04:39:38 +0900 |
|---|---|---|
| committer | volzhs | 2018-01-08 04:56:40 +0900 |
| commit | 93a6be0320e74f3a6524b1c1eefd8a05ff58cac5 (patch) | |
| tree | 01797bd1d69f2da56318c280cdf23b119a83f5a5 /editor/editor_settings.cpp | |
| parent | 37ca542d2bfd9aac296e82e30a76117090dea08e (diff) | |
| download | godot-93a6be0320e74f3a6524b1c1eefd8a05ff58cac5.tar.gz godot-93a6be0320e74f3a6524b1c1eefd8a05ff58cac5.tar.zst godot-93a6be0320e74f3a6524b1c1eefd8a05ff58cac5.zip | |
Diffstat (limited to 'editor/editor_settings.cpp')
| -rw-r--r-- | editor/editor_settings.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index bcdd23226..701882311 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -992,13 +992,17 @@ void EditorSettings::raise_order(const String &p_setting) { props[p_setting].order = ++last_order; } -void EditorSettings::set_initial_value(const StringName &p_setting, const Variant &p_value) { +void EditorSettings::set_initial_value(const StringName &p_setting, const Variant &p_value, bool update_current) { _THREAD_SAFE_METHOD_ if (!props.has(p_setting)) return; - _initial_set(p_setting, p_value); + props[p_setting].initial = p_value; + props[p_setting].has_default_value = true; + if (update_current) { + set(p_setting, p_value); + } } Variant _EDITOR_DEF(const String &p_setting, const Variant &p_default) { |
