]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix the small issue when you select by categories and then you
authorRafael Fernández López <ereslibre@kde.org>
Sat, 23 Jun 2007 15:47:20 +0000 (15:47 +0000)
committerRafael Fernández López <ereslibre@kde.org>
Sat, 23 Jun 2007 15:47:20 +0000 (15:47 +0000)
Ctrl+Click a subset, and those items selected were deselected

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

src/klistview.cpp

index 4fe0f571f4b18fe196a7d5d6d8bc3796c6fc2639..a67fc79a3c248816a85e18feb6dcf2c6727367b5 100644 (file)
@@ -826,7 +826,18 @@ void KListView::mouseReleaseEvent(QMouseEvent *event)
                 {
                     index = d->proxyModel->mapFromSource(mappedIndex);
 
-                    selection.select(index, index);
+                    if (d->isIndexSelected.contains(index))
+                    {
+                        if (!d->isIndexSelected[index])
+                            selection.select(index, index);
+
+                        d->isIndexSelected[index] = true;
+                    }
+                    else
+                    {
+                        d->isIndexSelected.insert(index, true);
+                        selection.select(index, index);
+                    }
                 }
 
                 selectionModel()->select(selection, QItemSelectionModel::Toggle);