Bladeren bron

fix some keys triggering their actions twice in GridMap

Geoffroy Warin 2 jaren geleden
bovenliggende
commit
5f3cbcb55d
1 gewijzigde bestanden met toevoegingen van 1 en 0 verwijderingen
  1. 1 0
      modules/gridmap/editor/grid_map_editor_plugin.cpp

+ 1 - 0
modules/gridmap/editor/grid_map_editor_plugin.cpp

@@ -749,6 +749,7 @@ EditorPlugin::AfterGUIInput GridMapEditor::forward_spatial_input_event(Camera3D
 				for (int i = 0; i < options->get_popup()->get_item_count(); ++i) {
 					const Ref<Shortcut> &shortcut = options->get_popup()->get_item_shortcut(i);
 					if (shortcut.is_valid() && shortcut->matches_event(p_event)) {
+						accept_event();
 						_menu_option(options->get_popup()->get_item_id(i));
 						return EditorPlugin::AFTER_GUI_INPUT_STOP;
 					}