m_selectionManager->beginAnchoredSelection(index);
}
- m_view->scrollToItem(index);
+ m_view->scrollToItem(index, KItemListView::ViewItemPosition::Beginning);
}
}
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);
}
}