diff options
Diffstat (limited to 'scene/gui/menu_button.cpp')
-rw-r--r-- | scene/gui/menu_button.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index 44d315eedc..372e4657e1 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -39,11 +39,9 @@ void MenuButton::_unhandled_key_input(InputEvent p_event) { if (!get_parent() || !is_visible() || is_disabled()) return; - if (get_viewport()->get_modal_stack_top() && !get_viewport()->get_modal_stack_top()->is_a_parent_of(this)) - return; //ignore because of modal window + bool global_only = (get_viewport()->get_modal_stack_top() && !get_viewport()->get_modal_stack_top()->is_a_parent_of(this)); - - if (popup->activate_item_by_event(p_event)) + if (popup->activate_item_by_event(p_event,global_only)) accept_event(); } } |