From: Rafael Fernández López Date: Thu, 10 Jan 2008 00:32:40 +0000 (+0000) Subject: Fix selections. Backport. X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/d1e5c3719d0ee7ed27ffc2b9b91d516672ca1ec5 Fix selections. Backport. svn path=/branches/KDE/4.0/kdebase/apps/; revision=759099 --- diff --git a/src/kcategorizedview.cpp b/src/kcategorizedview.cpp index 51b4a000b..648a712a5 100644 --- a/src/kcategorizedview.cpp +++ b/src/kcategorizedview.cpp @@ -1102,7 +1102,7 @@ void KCategorizedView::mouseReleaseEvent(QMouseEvent *event) { if (d->categoryVisualRect(category).contains(event->pos())) { - QItemSelection selection; + QItemSelection selection = selectionModel()->selection(); QModelIndexList indexList = d->categoriesIndexes[category]; foreach (const QModelIndex &index, indexList) @@ -1112,7 +1112,7 @@ void KCategorizedView::mouseReleaseEvent(QMouseEvent *event) selection << QItemSelectionRange(selectIndex); } - selectionModel()->select(selection, QItemSelectionModel::Select); + selectionModel()->select(selection, QItemSelectionModel::SelectCurrent); break; }