Преглед на файлове

MenuButton: Avoid event propagation if handled as hotkey

Ignacio Etcheverry преди 9 години
родител
ревизия
f9d1e03018
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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();
 	}
 }