Browse Source

Merge pull request #31004 from Kanabenki/fix-undo-close-scene

Don't add unsaved scene to previous scenes list when closing a tab
Rémi Verschelde 6 năm trước cách đây
mục cha
commit
b755cf1a2d
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      editor/editor_node.cpp

+ 3 - 1
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);