┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistcontroller.cpp
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2012-04-25 09:20:11 +0200
committerFrank Reininghaus <[email protected]>2012-04-25 09:20:23 +0200
commitc3bd4b44e4c172d06e8ae4822d9f467a8d272562 (patch)
tree85dbc45eb954d6507b3b4755ef122572e6ff643d /src/kitemviews/kitemlistcontroller.cpp
parent90baf5a8977caf5cbc1cd9c161c56e97e02a1aef (diff)
When the current item is removed, make -1 the current index temporarily
This fixes two problems: 1. KItemListKeyboardSearchManger can cancel the current search when a new folder is opened (note that this action removes the current item from the view). 2. The view can underline the new current item (which is the item that used to be below the removed item). Note that this did not work before because the view did not receive a currentChanged() signal in this case and therefore did not update the "current item" status of the new current item. CCBUG: 297488 CCBUG: 298782 REVIEW: 104709 (cherry picked from commit 68ce395a192362969783615e50a8004d3029eb7e)
Diffstat (limited to 'src/kitemviews/kitemlistcontroller.cpp')
-rw-r--r--src/kitemviews/kitemlistcontroller.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp
index 1f93a6357..1c35072e5 100644
--- a/src/kitemviews/kitemlistcontroller.cpp
+++ b/src/kitemviews/kitemlistcontroller.cpp
@@ -60,6 +60,8 @@ KItemListController::KItemListController(KItemModelBase* model, KItemListView* v
{
connect(m_keyboardManager, SIGNAL(changeCurrentItem(QString,bool)),
this, SLOT(slotChangeCurrentItem(QString,bool)));
+ connect(m_selectionManager, SIGNAL(currentChanged(int,int)),
+ m_keyboardManager, SLOT(slotCurrentChanged(int,int)));
m_autoActivationTimer = new QTimer(this);
m_autoActivationTimer->setSingleShot(true);