┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistcontroller.cpp
diff options
context:
space:
mode:
authorNicolas Fella <[email protected]>2023-10-24 23:12:22 +0200
committerNicolas Fella <[email protected]>2023-10-24 23:14:25 +0200
commit1826f905d706925456763394de17294bcb6d1c35 (patch)
tree6838f9f0a8423cc7b0b86554139299c649f53b42 /src/kitemviews/kitemlistcontroller.cpp
parent8b91acf05b2b41ae68268081d31af18cf66d3bca (diff)
parentef59e42c40df5e873a1a1b6c2173d5b55641a783 (diff)
Merge branch 'master' into kf6
Diffstat (limited to 'src/kitemviews/kitemlistcontroller.cpp')
-rw-r--r--src/kitemviews/kitemlistcontroller.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp
index be7a63e09..5abf1830b 100644
--- a/src/kitemviews/kitemlistcontroller.cpp
+++ b/src/kitemviews/kitemlistcontroller.cpp
@@ -539,7 +539,7 @@ void KItemListController::slotChangeCurrentItem(const QString &text, bool search
m_selectionManager->beginAnchoredSelection(index);
}
- m_view->scrollToItem(index);
+ m_view->scrollToItem(index, KItemListView::ViewItemPosition::Beginning);
}
}
@@ -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);
}
}