diff options
| author | allkhor | 2017-04-21 03:09:00 +0600 |
|---|---|---|
| committer | allkhor | 2017-04-21 03:11:32 +0600 |
| commit | b010b4a85c0efc96c7b246db9d0c4d784003dfe3 (patch) | |
| tree | 3fc7310114608fda706a84e752bd212b6649ff13 /editor/plugins/script_editor_plugin.cpp | |
| parent | ebddc57eb1cf887f545c02d97c1938577aef9647 (diff) | |
| download | godot-b010b4a85c0efc96c7b246db9d0c4d784003dfe3.tar.gz godot-b010b4a85c0efc96c7b246db9d0c4d784003dfe3.tar.zst godot-b010b4a85c0efc96c7b246db9d0c4d784003dfe3.zip | |
ScriptEditor: Fixes bug where menu option would be handled twice (2.1)
(cherry picked from commit 97c385d)
Diffstat (limited to '')
| -rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 31571ee80..997ab5015 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1552,25 +1552,26 @@ void ScriptEditor::_menu_option(int p_option) { } } } - } + } else { - EditorHelp *help = tab_container->get_current_tab_control()->cast_to<EditorHelp>(); - if (help) { + EditorHelp *help = tab_container->get_current_tab_control()->cast_to<EditorHelp>(); + if (help) { - switch (p_option) { + switch (p_option) { - case SEARCH_FIND: { - help->popup_search(); - } break; - case SEARCH_FIND_NEXT: { - help->search_again(); - } break; - case FILE_CLOSE: { - _close_current_tab(); - } break; - case CLOSE_DOCS: { - _close_docs_tab(); - } break; + case SEARCH_FIND: { + help->popup_search(); + } break; + case SEARCH_FIND_NEXT: { + help->search_again(); + } break; + case FILE_CLOSE: { + _close_current_tab(); + } break; + case CLOSE_DOCS: { + _close_docs_tab(); + } break; + } } } } |
