┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-12-11 19:20:39 +0100
committerPeter Penz <[email protected]>2011-12-11 19:23:02 +0100
commit7b679cc956d3a8ae5e069eecfe018919ce00b9a6 (patch)
tree0a935d694894657be7aff0afb907689dedd1a4c1 /src
parentc02daeba1ce7b522dc75ff7aa21915a2a263b9c5 (diff)
Scroll the view when the current item has been changed
We need now explicitly to scroll to the item when the current item has been changed, as this is not done automatically in the scope of KItemListView. BUG: 288745 FIXED-IN: 4.8.0
Diffstat (limited to 'src')
-rw-r--r--src/kitemviews/kitemlistcontroller.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp
index 90127aa17..263841a85 100644
--- a/src/kitemviews/kitemlistcontroller.cpp
+++ b/src/kitemviews/kitemlistcontroller.cpp
@@ -314,8 +314,7 @@ void KItemListController::slotChangeCurrentItem(const QString& text, bool search
int index;
if (searchFromNextItem) {
index = m_model->indexForKeyboardSearch(text, (currentIndex + 1) % m_model->count());
- }
- else {
+ } else {
index = m_model->indexForKeyboardSearch(text, currentIndex);
}
if (index >= 0) {
@@ -323,6 +322,7 @@ void KItemListController::slotChangeCurrentItem(const QString& text, bool search
m_selectionManager->clearSelection();
m_selectionManager->setSelected(index, 1);
m_selectionManager->beginAnchoredSelection(index);
+ m_view->scrollToItem(index);
}
}