As an unintended side-effect of
d9a18b04ea0b1b4e427f45083fdc0cdec87cbbfd
items would no longer be selected in icon view mode when the selection
rectangle intersected with the item's icon. This commit fixes this.
if (widgetRect.intersects(rubberBandRect)) {
// Select the full row intersecting with the rubberband rectangle
const QRectF selectionRect = widget->selectionRect().translated(widgetRect.topLeft());
- if (selectionRect.intersects(rubberBandRect)) {
+ const QRectF iconRect = widget->iconRect().translated(widgetRect.topLeft());
+ if (selectionRect.intersects(rubberBandRect) || iconRect.intersects(rubberBandRect)) {
selectedItems.insert(index);
}
}