diff options
Diffstat (limited to 'editor')
| -rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 8 | ||||
| -rw-r--r-- | editor/plugins/script_editor_plugin.h | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 9d7df4cd9..db734ffd1 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -497,7 +497,7 @@ void ScriptEditor::_open_recent_script(int p_idx) { } } -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()) @@ -517,7 +517,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); @@ -575,7 +577,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); } } } diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 0f7c0c56c..f0ada7eca 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -251,7 +251,9 @@ class ScriptEditor : public PanelContainer { void _update_recent_scripts(); void _open_recent_script(int p_idx); - void _close_tab(int p_idx, bool p_save = true); + void _show_error_dialog(String p_path); + + void _close_tab(int p_idx, bool p_save = true, bool p_history_back = true); void _close_current_tab(); void _close_discard_current_tab(const String &p_str); |
