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
This commit is contained in:
Rafael Fernández López 2007-06-23 15:47:20 +00:00
parent 78195dd8fe
commit ad3beec4b2

View 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);