diff options
| author | Amol Godbole <[email protected]> | 2023-10-13 21:08:35 -0500 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2023-10-17 15:47:34 +0000 |
| commit | a59d9f85fa770a00d10e66025e102c736e18fa70 (patch) | |
| tree | 9f19443512de2c0adc1fa75082ba27495188ca3f /src/kitemviews/kitemlistcontroller.cpp | |
| parent | d1035e7f090a5c810e72e37a03df81b2a4389747 (diff) | |
KItemListView: add view position in scrollToItem()
An item, on being scrolled to, is always located at the nearest edge of
the view. This is not always convenient. Allow specifying where the item
should be positioned with respect to the view in scrollToItem().
BUG: 423884
Diffstat (limited to 'src/kitemviews/kitemlistcontroller.cpp')
| -rw-r--r-- | src/kitemviews/kitemlistcontroller.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp index be7a63e09..0016bb22a 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); } } |
