Explorar o código

MenuButton: Avoid event propagation if handled as hotkey

Ignacio Etcheverry %!s(int64=9) %!d(string=hai) anos
pai
achega
f9d1e03018
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      scene/gui/menu_button.cpp

+ 2 - 1
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();
 	}
 }