mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
selection: select-on-rubberband-on-row as new default
Sets a rectangular, non-full-width rubberband as the new default. User selection is made wherever the rubberband intersects with the row.
This commit is contained in:
parent
e08f6f9b58
commit
2a4dd2aa43
|
@ -1302,9 +1302,9 @@ void KItemListController::slotRubberBandChanged()
|
||||||
|
|
||||||
const QRectF widgetRect = m_view->itemRect(index);
|
const QRectF widgetRect = m_view->itemRect(index);
|
||||||
if (widgetRect.intersects(rubberBandRect)) {
|
if (widgetRect.intersects(rubberBandRect)) {
|
||||||
const QRectF iconRect = widget->iconRect().translated(widgetRect.topLeft());
|
// Select the full row intersecting with the rubberband rectangle
|
||||||
const QRectF textRect = widget->textRect().translated(widgetRect.topLeft());
|
const QRectF selectionRect = widget->selectionRect().translated(widgetRect.topLeft());
|
||||||
if (iconRect.intersects(rubberBandRect) || textRect.intersects(rubberBandRect)) {
|
if (selectionRect.intersects(rubberBandRect)) {
|
||||||
selectedItems.insert(index);
|
selectedItems.insert(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue