You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Merge pull request #5758 from TheHX/issue-5756
Fix editor states saving, and remove related error messages
This commit is contained in:
@@ -704,7 +704,7 @@ void EditorNode::_get_scene_metadata(const String& p_file) {
|
|||||||
cf.instance();
|
cf.instance();
|
||||||
|
|
||||||
Error err = cf->load(path);
|
Error err = cf->load(path);
|
||||||
if (err!=OK)
|
if (err!=OK || !cf->has_section("editor_states"))
|
||||||
return; //must not exist
|
return; //must not exist
|
||||||
|
|
||||||
List<String> esl;
|
List<String> esl;
|
||||||
@@ -740,7 +740,14 @@ void EditorNode::_set_scene_metadata(const String& p_file, int p_idx) {
|
|||||||
Ref<ConfigFile> cf;
|
Ref<ConfigFile> cf;
|
||||||
cf.instance();
|
cf.instance();
|
||||||
|
|
||||||
Dictionary md = editor_data.get_edited_scene()==p_idx?editor_data.get_editor_states():editor_data.get_scene_editor_states(p_idx);
|
Dictionary md;
|
||||||
|
|
||||||
|
if (p_idx<0 || editor_data.get_edited_scene()==p_idx) {
|
||||||
|
md = editor_data.get_editor_states();
|
||||||
|
} else {
|
||||||
|
md = editor_data.get_scene_editor_states(p_idx);
|
||||||
|
}
|
||||||
|
|
||||||
List<Variant> keys;
|
List<Variant> keys;
|
||||||
md.get_key_list(&keys);
|
md.get_key_list(&keys);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user