X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/743bec375187a51ed6b88256ff070e9f7e9f4929..ac73af7bedeebe2afa451249e8a6500651a6ec00:/src/kcategorizedview.cpp 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; }