mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-05 16:19:10 +00:00
Fix rubberband selection on icon in icon view mode
As an unintended side-effect of d9a18b04ea
items would no longer be selected in icon view mode when the selection
rectangle intersected with the item's icon. This commit fixes this.
This commit is contained in:
parent
263935f9ed
commit
5c7887a763
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue