Skip to content

Fix: prev/next image shortcuts append to selected images

Sebastien Waegeneire requested to merge swae/gwenview:master into master

The issue was due to the fact that the ThumbnailView setSelectionMode is set to QAbstractItemView::ExtendedSelection.

When mThumbnailView->setCurrentIndex(index) was called and CTRL was pressed the selection was not cleared and the next/prev image was added to the list of selected items.

This does break one thing. When focused on the bottom thumbnails panel, pressing the left/right arrow keys and CTRL will no longer append the image to the selected items. It will only navigate to the next/prev image (i.e. the CTRL modifier is ignored). Let me know if I should look for way to preserve the current behavior.

https://doc.qt.io/qt-6/qabstractitemview.html#SelectionMode-enum

BUG: 408979

Merge request reports