Browse Source

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

Andreas Kling 5 years ago
parent
commit
98a68c82bc
1 changed files with 1 additions and 1 deletions
  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)) {
             if (item_rect(i).contains(adjusted_position)) {
                 auto index = model()->index(i, 0);
                 auto index = model()->index(i, 0);
                 if (event.modifiers() & Mod_Ctrl)
                 if (event.modifiers() & Mod_Ctrl)
-                    selection().add(index);
+                    selection().toggle(index);
                 else
                 else
                     selection().set(index);
                     selection().set(index);
                 return;
                 return;