Ver Fonte

GItemView: Make Ctrl+click toggle item selection on/off

Andreas Kling há 5 anos atrás
pai
commit
98a68c82bc
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      Libraries/LibGUI/GItemView.cpp

+ 1 - 1
Libraries/LibGUI/GItemView.cpp

@@ -76,7 +76,7 @@ void GItemView::mousedown_event(GMouseEvent& event)
             if (item_rect(i).contains(adjusted_position)) {
                 auto index = model()->index(i, 0);
                 if (event.modifiers() & Mod_Ctrl)
-                    selection().add(index);
+                    selection().toggle(index);
                 else
                     selection().set(index);
                 return;