Prechádzať zdrojové kódy

Merge pull request #9413 from Noshyaar/pr-save1

Clean up redundancy in scene save confirmation
Rémi Verschelde 8 rokov pred
rodič
commit
460ec3344e
1 zmenil súbory, kde vykonal 1 pridanie a 3 odobranie
  1. 1 3
      editor/editor_node.cpp

+ 1 - 3
editor/editor_node.cpp

@@ -2746,12 +2746,10 @@ void EditorNode::_discard_changes(const String &p_str) {
 			_update_scene_tabs();
 
 			if (current_option == FILE_CLOSE_ALL_AND_QUIT || current_option == FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER) {
-				int next_scene = _next_unsaved_scene();
-				if (next_scene == -1) {
+				if (_next_unsaved_scene() == -1) {
 					current_option = current_option == FILE_CLOSE_ALL_AND_QUIT ? FILE_QUIT : RUN_PROJECT_MANAGER;
 					_discard_changes();
 				} else {
-					tab_closing = next_scene;
 					_menu_option_confirm(current_option, false);
 				}
 			} else {