From 4aca27e2fa4a32d2bd618d1ce2ac14cec299c903 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Sat, 22 Jul 2017 10:08:56 +0100 Subject: [PATCH] Fixed script tab selection on file close, issue 8400 (cherry picked from commit 39061340035e94a2fb43273ca32601c7c8a811b6) --- editor/plugins/script_editor_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 9106bf56e77..2ce605b6273 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -731,6 +731,9 @@ void ScriptEditor::_close_tab(int p_idx) { apply_scripts(); } + // roll back to previous tab + _history_back(); + //remove from history history.resize(history_pos + 1);