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
Notes: sideshowbarker 2024-07-19 12:13:44 +09:00

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;