瀏覽代碼

Fix TileMap editor so that pressing control deselects cells correctly

Gilles Roudière 2 年之前
父節點
當前提交
83f1e31483
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      editor/plugins/tiles/tile_map_editor.cpp

+ 1 - 1
editor/plugins/tiles/tile_map_editor.cpp

@@ -675,7 +675,7 @@ bool TileMapEditorTilesPlugin::forward_canvas_gui_input(const Ref<InputEvent> &p
 					}
 				} else if (tool_buttons_group->get_pressed_button() == select_tool_button) {
 					drag_start_mouse_pos = mpos;
-					if (tile_map_selection.has(tile_map->local_to_map(drag_start_mouse_pos)) && !mb->is_shift_pressed()) {
+					if (tile_map_selection.has(tile_map->local_to_map(drag_start_mouse_pos)) && !mb->is_shift_pressed() && !mb->is_command_or_control_pressed()) {
 						// Move the selection
 						_update_selection_pattern_from_tilemap_selection(); // Make sure the pattern is up to date before moving.
 						drag_type = DRAG_TYPE_MOVE;