diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-18 12:30:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-18 12:30:56 +0200 |
commit | 671c58362abae423732787a4b2c6128410c7fbee (patch) | |
tree | 97e84605fc5b3bc44ca7071604d553a753a25ba2 /editor | |
parent | 43755eada4a9fbc5e7aabb03a6b1aa3ab3213826 (diff) | |
parent | 5e7f9639238ed9dc4cd2ee22ffbec9dae02925b5 (diff) |
Merge pull request #40525 from KoBeWi/fastest_close_in_the_west
Make closing current scene faster
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 73bb1f3856..657ec9d70b 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2408,11 +2408,13 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { } } break; - case FILE_CLOSE_ALL_AND_QUIT: - case FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER: case FILE_CLOSE: { + _scene_tab_closed(editor_data.get_edited_scene()); + } break; + case FILE_CLOSE_ALL_AND_QUIT: + case FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER: { if (!p_confirmed) { - tab_closing = p_option == FILE_CLOSE ? editor_data.get_edited_scene() : _next_unsaved_scene(false); + tab_closing = _next_unsaved_scene(false); _scene_tab_changed(tab_closing); if (unsaved_cache || p_option == FILE_CLOSE_ALL_AND_QUIT || p_option == FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER) { @@ -2425,8 +2427,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { break; } } - } else if (p_option == FILE_CLOSE) { - tab_closing = editor_data.get_edited_scene(); } if (!editor_data.get_edited_scene_root(tab_closing)) { // empty tab |