From 9a302e32c826c6f8c6ab89634b8e43af17b41371 Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 23 Jun 2023 11:19:09 +0200 Subject: [PATCH] Speed up closing multiple scripts --- editor/plugins/script_editor_plugin.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index c23a96bede4..3fbb9d0ade3 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -846,13 +846,14 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) { _update_selected_editor_menu(); } - _update_history_arrows(); - - _update_script_names(); - _update_members_overview_visibility(); - _update_help_overview_visibility(); - _save_layout(); - _update_find_replace_bar(); + if (script_close_queue.is_empty()) { + _update_history_arrows(); + _update_script_names(); + _update_members_overview_visibility(); + _update_help_overview_visibility(); + _save_layout(); + _update_find_replace_bar(); + } } void ScriptEditor::_close_current_tab(bool p_save) {