]> cloud.milkyroute.net Git - dolphin.git/commitdiff
stay consistent with the QListView behavior: changed the current index also changes...
authorPeter Penz <peter.penz19@gmail.com>
Thu, 21 Feb 2008 17:34:14 +0000 (17:34 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Thu, 21 Feb 2008 17:34:14 +0000 (17:34 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=777817

src/dolphindetailsview.cpp
src/dolphindetailsview.h

index c8c419f025451c736a04bd85cded9c2e9f0dd212..a725c06f3180162124deb8b4ba3bcf80bd2a7cc4 100644 (file)
@@ -394,6 +394,12 @@ void DolphinDetailsView::wheelEvent(QWheelEvent* event)
     QTreeView::wheelEvent(event);
 }
 
+void DolphinDetailsView::currentChanged(const QModelIndex& current, const QModelIndex& previous)
+{
+    QTreeView::currentChanged(current, previous);
+    selectionModel()->select(current, QItemSelectionModel::ClearAndSelect);
+}
+
 void DolphinDetailsView::setSortIndicatorSection(DolphinView::Sorting sorting)
 {
     QHeaderView* headerView = header();
index 14e995f6b75806276392cc80bbbf952996d62667..295936258a79365f55226c45c2a341bfca1c9bb1 100644 (file)
@@ -59,6 +59,7 @@ protected:
     virtual void keyPressEvent(QKeyEvent* event);
     virtual void resizeEvent(QResizeEvent* event);
     virtual void wheelEvent(QWheelEvent* event);
+    virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous);
 
 private slots:
     /**