From: Rafael Fernández López Date: Sat, 23 Jun 2007 15:47:20 +0000 (+0000) Subject: Fix the small issue when you select by categories and then you X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/ad3beec4b22f5e119879b2f312ba7180d99a4bf6?ds=sidebyside Fix the small issue when you select by categories and then you Ctrl+Click a subset, and those items selected were deselected svn path=/trunk/KDE/kdebase/apps/; revision=679315 --- diff --git a/src/klistview.cpp b/src/klistview.cpp index 4fe0f571f..a67fc79a3 100644 --- a/src/klistview.cpp +++ b/src/klistview.cpp @@ -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);