1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #16455 from volzhs/close-docs

Keep to show current script when closing all docs
This commit is contained in:
Rémi Verschelde
2018-02-20 09:40:29 +01:00
committed by GitHub
4 changed files with 20 additions and 13 deletions

View File

@@ -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);
}
}
}