summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2017-04-17 02:41:24 +0200
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2017-04-17 02:45:56 +0200
commit97c385dbb8fc6fd0766fdae65a877dc8f04dac4c (patch)
tree0ebe4ce741a513925f9fd16b9cbc77a65969080b
parente55a496f79e80f9ab08c96bf0f74c565203758bb (diff)
ScriptEditor: Fixes bug where menu option would be handled twice
-rw-r--r--editor/plugins/script_editor_plugin.cpp39
1 files changed, 20 insertions, 19 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 8ce0f51211..c94ab706bc 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -878,28 +878,29 @@ 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 HELP_SEARCH_FIND: {
- help->popup_search();
- } break;
- case HELP_SEARCH_FIND_NEXT: {
- help->search_again();
- } break;
- case FILE_CLOSE: {
- _close_current_tab();
- } break;
- case CLOSE_DOCS: {
- _close_docs_tab();
- } break;
- case CLOSE_ALL: {
- _close_all_tabs();
- } break;
+ case HELP_SEARCH_FIND: {
+ help->popup_search();
+ } break;
+ case HELP_SEARCH_FIND_NEXT: {
+ help->search_again();
+ } break;
+ case FILE_CLOSE: {
+ _close_current_tab();
+ } break;
+ case CLOSE_DOCS: {
+ _close_docs_tab();
+ } break;
+ case CLOSE_ALL: {
+ _close_all_tabs();
+ } break;
+ }
}
}
}