]> cloud.milkyroute.net Git - dolphin.git/commitdiff
also update the current index if a deselection is done
authorPeter Penz <peter.penz19@gmail.com>
Mon, 16 Jun 2008 21:19:34 +0000 (21:19 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Mon, 16 Jun 2008 21:19:34 +0000 (21:19 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=821216

src/selectionmanager.cpp

index af92e63d04f0dab183519e6ab5dbb3d43d985030..47ef16d1a73271a026ad53b23b0af3b3e55ca035 100644 (file)
@@ -106,10 +106,10 @@ void SelectionManager::setItemSelected(bool selected)
         QItemSelectionModel* selModel = m_view->selectionModel();
         if (selected) {
             selModel->select(index, QItemSelectionModel::Select);
         QItemSelectionModel* selModel = m_view->selectionModel();
         if (selected) {
             selModel->select(index, QItemSelectionModel::Select);
-            selModel->setCurrentIndex(index, QItemSelectionModel::Select);
         } else {
             selModel->select(index, QItemSelectionModel::Deselect);
         }
         } else {
             selModel->select(index, QItemSelectionModel::Deselect);
         }
+        selModel->setCurrentIndex(index, QItemSelectionModel::Current);
     }
 }
 
     }
 }