From 331f922359a7ec367542262822af47c683a4f734 Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Mon, 15 Apr 2019 22:17:49 +0200 Subject: [PATCH] Save opened scenes when necessary --- editor/editor_node.cpp | 2 ++ editor/filesystem_dock.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 8a670025039..851d6a0aa68 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1306,6 +1306,7 @@ void EditorNode::_dialog_action(String p_file) { _save_default_environment(); _save_scene_with_preview(p_file, scene_idx); _add_to_recent_scenes(p_file); + save_layout(); if (scene_idx != -1) _discard_changes(); @@ -4069,6 +4070,7 @@ void EditorNode::_load_open_scenes_from_config(Ref p_layout, const S for (int i = 0; i < scenes.size(); i++) { load_scene(scenes[i]); } + save_layout(); restoring_scenes = false; } diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 5a1383be6d7..c32cd1de503 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -1021,6 +1021,7 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_ for (int j = 0; j < ed->get_edited_scene_count(); j++) { if (ed->get_scene_path(j) == file_changed_paths[i]) { ed->get_edited_scene_root(j)->set_filename(new_item_path); + editor->save_layout(); break; } }