diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-07-16 14:45:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-16 14:45:08 +0200 |
commit | e2ad08c56b41ce5e33e0ed3f702f6133eb58f618 (patch) | |
tree | 2574fe08280d0059a087f942263145ec98d66e9b /scene | |
parent | 24d86e33a6ef0d787a37639831ae582a397d821c (diff) | |
parent | f9d1e03018bc9fa7d32fd99cb21d5bf58140c265 (diff) |
Merge pull request #4848 from neikeq/menu-accept-event
MenuButton: Avoid key event propagation if handled as hotkey
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/menu_button.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index 28d67287d5..39a8ad0473 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -39,7 +39,8 @@ void MenuButton::_unhandled_key_input(InputEvent p_event) { return; - int item = popup->activate_item_by_event(p_event); + if (popup->activate_item_by_accelerator(code)) + accept_event(); } } |