Fixed script tab selection on file close, issue 8400

This commit is contained in:
Paulb23 2017-07-22 10:08:56 +01:00
parent 4fe6b2a674
commit 3906134003

View file

@ -32,13 +32,13 @@
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/editor_settings.h" #include "editor/editor_settings.h"
#include "editor/script_editor_debugger.h" #include "editor/script_editor_debugger.h"
#include "project_settings.h"
#include "io/resource_loader.h" #include "io/resource_loader.h"
#include "io/resource_saver.h" #include "io/resource_saver.h"
#include "os/file_access.h" #include "os/file_access.h"
#include "os/input.h" #include "os/input.h"
#include "os/keyboard.h" #include "os/keyboard.h"
#include "os/os.h" #include "os/os.h"
#include "project_settings.h"
#include "scene/main/viewport.h" #include "scene/main/viewport.h"
/*** SCRIPT EDITOR ****/ /*** SCRIPT EDITOR ****/
@ -518,6 +518,9 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save) {
_add_recent_script(help->get_class()); _add_recent_script(help->get_class());
} }
// roll back to previous tab
_history_back();
//remove from history //remove from history
history.resize(history_pos + 1); history.resize(history_pos + 1);