aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/script_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2018-02-20 09:40:29 +0100
committerGitHub2018-02-20 09:40:29 +0100
commit55f00d9655ca3f9ccfdcac2fba8081df9869ba16 (patch)
tree3d10cd32dd58e5496819bc7087611b159c9c7a6e /editor/plugins/script_editor_plugin.cpp
parentc62a6942dcdf3b1cbdafa3d858cf9694effeee98 (diff)
parentdf84290a7ee2e4e939fc4eccc030129227c83895 (diff)
downloadgodot-55f00d9655ca3f9ccfdcac2fba8081df9869ba16.tar.gz
godot-55f00d9655ca3f9ccfdcac2fba8081df9869ba16.tar.zst
godot-55f00d9655ca3f9ccfdcac2fba8081df9869ba16.zip
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r--editor/plugins/script_editor_plugin.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index a2641738f..c06531d97 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -505,7 +505,7 @@ void ScriptEditor::_show_error_dialog(String p_path) {
error_dialog->popup_centered_minsize();
}
-void ScriptEditor::_close_tab(int p_idx, bool p_save) {
+void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) {
int selected = p_idx;
if (selected < 0 || selected >= tab_container->get_child_count())
@@ -521,7 +521,9 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save) {
}
// roll back to previous tab
- _history_back();
+ if (p_history_back) {
+ _history_back();
+ }
//remove from history
history.resize(history_pos + 1);
@@ -579,7 +581,7 @@ void ScriptEditor::_close_docs_tab() {
EditorHelp *se = Object::cast_to<EditorHelp>(tab_container->get_child(i));
if (se) {
- _close_tab(i);
+ _close_tab(i, true, false);
}
}
}