Select elements correctly when clicking on the category for selecting.

svn path=/trunk/KDE/kdebase/apps/; revision=687361
This commit is contained in:
Rafael Fernández López 2007-07-13 12:25:50 +00:00
parent 292e732ff9
commit 5c5590846d

View file

@ -865,10 +865,10 @@ void KCategorizedView::mouseReleaseEvent(QMouseEvent *event)
{
if (d->categoryVisualRect(category).contains(event->pos()))
{
QItemSelectionRange selectionRange(d->proxyModel->mapFromSource(d->categoriesIndexes[category][0]),
d->proxyModel->mapFromSource(d->categoriesIndexes[category][d->categoriesIndexes[category].count() - 1]));
selection << selectionRange;
foreach (const QModelIndex &index, d->categoriesIndexes[category])
{
selection << QItemSelectionRange(d->proxyModel->mapFromSource(index));
}
selectionModel()->select(selection, QItemSelectionModel::Select);