1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 06:14:58 +00:00

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

This commit is contained in:
Andreas Kling 2019-09-07 19:37:43 +02:00
parent a5e0242992
commit 98a68c82bc

View file

@ -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;