diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-10-30 15:28:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-30 15:28:04 +0100 |
commit | cfb8bfb4545fdfb8ffe1e78920c4a695e1f5dad2 (patch) | |
tree | ac50c4df68d5b01e2c896551b57619387940a886 | |
parent | 0aebddafc1636f3e7628cdac8028c2ce69c5abe8 (diff) | |
parent | 696c47d9aba44edb5ca55f8c6a27381170eb4237 (diff) | |
download | redot-engine-cfb8bfb4545fdfb8ffe1e78920c4a695e1f5dad2.tar.gz |
Merge pull request #6976 from volzhs/last-select-lang
Fix bug with saving last select language and remove warning
-rw-r--r-- | tools/editor/editor_settings.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index f5741c4a9e..78bfd7cf25 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -1032,7 +1032,6 @@ String EditorSettings::get_last_selected_language() String path = get_project_settings_path().plus_file("project_metadata.cfg"); Error err = cf->load(path); if (err != OK) { - WARN_PRINTS("Can't load config file: " + path); return ""; } Variant last_selected_language = cf->get_value("script_setup", "last_selected_language"); @@ -1045,11 +1044,7 @@ void EditorSettings::set_last_selected_language(String p_language) { Ref<ConfigFile> cf = memnew( ConfigFile ); String path = get_project_settings_path().plus_file("project_metadata.cfg"); - Error err = cf->load(path); - if (err != OK) { - WARN_PRINTS("Can't load config file: " + path); - return; - } + cf->load(path); cf->set_value("script_setup", "last_selected_language", p_language); cf->save(path); } |