diff options
| author | Rémi Verschelde | 2018-01-08 20:08:04 +0100 |
|---|---|---|
| committer | GitHub | 2018-01-08 20:08:04 +0100 |
| commit | 15cb56122e3275b1b0f5018e03350ec1c2573d4a (patch) | |
| tree | 57d4a45d0bd965b6c79d1483d67ce66fce310541 /editor/plugins/script_editor_plugin.cpp | |
| parent | 299e490cf4c9cfd72a9e4f53effaa41bf5e0d7df (diff) | |
| parent | 7e1b39245f96d425d5fb64cffef0c29e6c04deaa (diff) | |
| download | godot-15cb56122e3275b1b0f5018e03350ec1c2573d4a.tar.gz godot-15cb56122e3275b1b0f5018e03350ec1c2573d4a.tar.zst godot-15cb56122e3275b1b0f5018e03350ec1c2573d4a.zip | |
Merge pull request #15498 from poke1024/fix15478
Don't delete edit menu too early when closing script tabs
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index bc986cee9..51954a24d 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -514,7 +514,6 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save) { if (p_save) { apply_scripts(); } - current->clear_edit_menu(); notify_script_close(current->get_edited_script()); } else { EditorHelp *help = Object::cast_to<EditorHelp>(tab_container->get_child(selected)); @@ -540,6 +539,9 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save) { } int idx = tab_container->get_current_tab(); + if (current) { + current->clear_edit_menu(); + } memdelete(tselected); if (idx >= tab_container->get_child_count()) idx = tab_container->get_child_count() - 1; |
