Explorar el Código

MenuButton: Avoid event propagation if handled as hotkey

Ignacio Etcheverry hace 9 años
padre
commit
f9d1e03018
Se han modificado 1 ficheros con 2 adiciones y 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();
 	}
 }