summaryrefslogtreecommitdiff
path: root/editor/editor_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_settings.cpp')
-rw-r--r--editor/editor_settings.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index bde9f3e931..37a531299f 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -867,7 +867,6 @@ void EditorSettings::create() {
}
singleton->save_changed_setting = true;
- singleton->config_file_path = config_file_path;
print_verbose("EditorSettings: Load OK!");
@@ -892,8 +891,8 @@ fail:
}
singleton = Ref<EditorSettings>(memnew(EditorSettings));
+ singleton->set_path(config_file_path, true);
singleton->save_changed_setting = true;
- singleton->config_file_path = config_file_path;
singleton->_load_defaults(extra_config);
singleton->setup_language();
singleton->setup_network();
@@ -953,15 +952,10 @@ void EditorSettings::save() {
return;
}
- if (singleton->config_file_path.is_empty()) {
- ERR_PRINT("Cannot save EditorSettings config, no valid path");
- return;
- }
-
- Error err = ResourceSaver::save(singleton->config_file_path, singleton);
+ Error err = ResourceSaver::save(singleton);
if (err != OK) {
- ERR_PRINT("Error saving editor settings to " + singleton->config_file_path);
+ ERR_PRINT("Error saving editor settings to " + singleton->get_path());
} else {
singleton->changed_settings.clear();
print_verbose("EditorSettings: Save OK!");