diff options
| author | Felix Ernst <[email protected]> | 2023-10-23 14:26:52 +0000 |
|---|---|---|
| committer | Felix Ernst <[email protected]> | 2023-10-23 14:26:52 +0000 |
| commit | 5c7887a763ea1a58ebcf93c047ab39b00eb6a8eb (patch) | |
| tree | 1440585beedbd26a7c5d00badb04343a6c3896d3 /src | |
| parent | 263935f9ede391ab8ada455403a70b6f547e7fd5 (diff) | |
Fix rubberband selection on icon in icon view mode
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/kitemviews/kitemlistcontroller.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp index 0016bb22a..5abf1830b 100644 --- a/src/kitemviews/kitemlistcontroller.cpp +++ b/src/kitemviews/kitemlistcontroller.cpp @@ -1299,7 +1299,8 @@ void KItemListController::slotRubberBandChanged() 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); } } |
