mirror of https://github.com/godotengine/godot
Merge pull request #78152 from brno32/editor-persistence-empty-scene-fix
Prevent non-existent scene from being saved to persistent editor config
This commit is contained in:
commit
a5206e449e
|
|
@ -4932,8 +4932,11 @@ void EditorNode::_save_open_scenes_to_config(Ref<ConfigFile> p_layout) {
|
||||||
p_layout->set_value(EDITOR_NODE_CONFIG_SECTION, "open_scenes", scenes);
|
p_layout->set_value(EDITOR_NODE_CONFIG_SECTION, "open_scenes", scenes);
|
||||||
|
|
||||||
String currently_edited_scene_path = editor_data.get_scene_path(editor_data.get_edited_scene());
|
String currently_edited_scene_path = editor_data.get_scene_path(editor_data.get_edited_scene());
|
||||||
|
// Don't save a bad path to the config.
|
||||||
|
if (!currently_edited_scene_path.is_empty()) {
|
||||||
p_layout->set_value(EDITOR_NODE_CONFIG_SECTION, "current_scene", currently_edited_scene_path);
|
p_layout->set_value(EDITOR_NODE_CONFIG_SECTION, "current_scene", currently_edited_scene_path);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void EditorNode::save_editor_layout_delayed() {
|
void EditorNode::save_editor_layout_delayed() {
|
||||||
editor_layout_save_delay_timer->start();
|
editor_layout_save_delay_timer->start();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue