summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulb23 <p_batty@hotmail.co.uk>2017-07-22 10:08:56 +0100
committerPaulb23 <p_batty@hotmail.co.uk>2017-07-22 10:23:19 +0100
commit39061340035e94a2fb43273ca32601c7c8a811b6 (patch)
tree8a17cb1b257d6e155e575810ac232f8ba1979cad
parent4fe6b2a6744c4852cd3fdf0bc7a3437f8a16645f (diff)
Fixed script tab selection on file close, issue 8400
-rw-r--r--editor/plugins/script_editor_plugin.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index aeb16f13ee..774d3d7954 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -32,13 +32,13 @@
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/script_editor_debugger.h"
-#include "project_settings.h"
#include "io/resource_loader.h"
#include "io/resource_saver.h"
#include "os/file_access.h"
#include "os/input.h"
#include "os/keyboard.h"
#include "os/os.h"
+#include "project_settings.h"
#include "scene/main/viewport.h"
/*** SCRIPT EDITOR ****/
@@ -518,6 +518,9 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save) {
_add_recent_script(help->get_class());
}
+ // roll back to previous tab
+ _history_back();
+
//remove from history
history.resize(history_pos + 1);