Commit 705a4837 authored by Rafael Fernández López's avatar Rafael Fernández López
Browse files

Let deselect items individually using Ctrl+Click

svn path=/trunk/KDE/kdebase/apps/; revision=680368
parent a04f4e07
......@@ -699,6 +699,7 @@ void KListView::setSelection(const QRect &rect,
}
QItemSelection selection;
QItemSelection deselect;
QModelIndexList dirtyIndexes = d->intersectionSet(rect);
foreach (const QModelIndex &index, dirtyIndexes)
{
......@@ -707,9 +708,15 @@ void KListView::setSelection(const QRect &rect,
if (d->isIndexSelected.contains(index))
{
if (!d->isIndexSelected[index])
{
selection.select(index, index);
d->isIndexSelected[index] = true;
d->isIndexSelected[index] = true;
}
else
{
deselect.select(index, index);
d->isIndexSelected[index] = false;
}
}
else
{
......@@ -747,8 +754,6 @@ void KListView::setSelection(const QRect &rect,
}
}
QItemSelection deselect;
foreach (const QModelIndex &index, d->isIndexSelected.keys())
{
if (!rect.intersects(visualRect(index)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment