]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix selections
authorRafael Fernández López <ereslibre@kde.org>
Thu, 10 Jan 2008 00:32:05 +0000 (00:32 +0000)
committerRafael Fernández López <ereslibre@kde.org>
Thu, 10 Jan 2008 00:32:05 +0000 (00:32 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=759098

src/kcategorizedview.cpp

index 51b4a000bd5e57ff3fc5a406f06dce49c9ca4f5e..648a712a5373cc1c168cc24e2757c961b24ff16d 100644 (file)
@@ -1102,7 +1102,7 @@ void KCategorizedView::mouseReleaseEvent(QMouseEvent *event)
         {
             if (d->categoryVisualRect(category).contains(event->pos()))
             {
-                QItemSelection selection;
+                QItemSelection selection = selectionModel()->selection();
                 QModelIndexList indexList = d->categoriesIndexes[category];
 
                 foreach (const QModelIndex &index, indexList)
@@ -1112,7 +1112,7 @@ void KCategorizedView::mouseReleaseEvent(QMouseEvent *event)
                     selection << QItemSelectionRange(selectIndex);
                 }
 
-                selectionModel()->select(selection, QItemSelectionModel::Select);
+                selectionModel()->select(selection, QItemSelectionModel::SelectCurrent);
 
                 break;
             }