]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix selection in the Details view in the following use case:
authorFrank Reininghaus <frank78ac@googlemail.com>
Tue, 8 Sep 2009 17:52:52 +0000 (17:52 +0000)
committerFrank Reininghaus <frank78ac@googlemail.com>
Tue, 8 Sep 2009 17:52:52 +0000 (17:52 +0000)
1. Ctrl-click item 1.
2. Enter the first letter of item 2, such that
   it will be selected and the new current item.
3. Shift-click item 3.

With this commit, all items between 2 and 3 will be selected, as
expected, and not all items between 1 and 3.

BUG: 201459

svn path=/trunk/KDE/kdebase/apps/; revision=1021267

src/dolphindetailsview.cpp

index 088e5dc7ebb9d10d99157c149035acc8ea9ffb93..cf487b5e7e7efa6d64aa220cd4c98a3e3a664365 100644 (file)
@@ -421,7 +421,7 @@ void DolphinDetailsView::currentChanged(const QModelIndex& current, const QModel
     // Stay consistent with QListView: When changing the current index by key presses,
     // also change the selection.
     if (m_keyPressed) {
     // Stay consistent with QListView: When changing the current index by key presses,
     // also change the selection.
     if (m_keyPressed) {
-        selectionModel()->select(current, QItemSelectionModel::ClearAndSelect);
+        setCurrentIndex(current);
     }
 }
 
     }
 }