diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-01 08:45:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-01 08:45:36 +0200 |
commit | b755cf1a2d4952ab245fdee4390a49cf900d0cb0 (patch) | |
tree | ddd7a75b19e78364e8491af63c68a0e7e97043eb /editor | |
parent | 8743da90d964f7b9110f6e3578fba30ac810f6ac (diff) | |
parent | 648313ab8a7364ce9429108b22d31cd22e555bc3 (diff) |
Merge pull request #31004 from Kanabenki/fix-undo-close-scene
Don't add unsaved scene to previous scenes list when closing a tab
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 2cbe408828..faa936bd64 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2640,7 +2640,9 @@ void EditorNode::_discard_changes(const String &p_str) { Node *scene = editor_data.get_edited_scene_root(tab_closing); if (scene != NULL) { String scene_filename = scene->get_filename(); - previous_scenes.push_back(scene_filename); + if (scene_filename != "") { + previous_scenes.push_back(scene_filename); + } } _remove_scene(tab_closing); |