Skip to content

Fix SHIFT key selection behaviour in KCategorizedView

Tom Moebert requested to merge tommo/kitemviews:fix-shift-selection into master

Previously, when holding the SHIFT key while clicking two items in the view, only items which intersected the "selection rectangle" were selected. However, the documentation of QAbstractItemView::ExtendedSelection says:

"If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected..."

This change fixes this behaviour by respecting the view's state(). You can test this behaviour with the kcategorizedviewtest.

Merge request reports