mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Forgot to modify the code for category selection. Fixed.
svn path=/trunk/KDE/kdebase/apps/; revision=748264
This commit is contained in:
parent
51b61d7735
commit
2df7bd3475
1 changed files with 6 additions and 15 deletions
|
@ -1059,37 +1059,28 @@ void KCategorizedView::mouseReleaseEvent(QMouseEvent *event)
|
|||
initialPressPosition.setY(initialPressPosition.y() + verticalOffset());
|
||||
initialPressPosition.setX(initialPressPosition.x() + horizontalOffset());
|
||||
|
||||
QItemSelection selection;
|
||||
QItemSelection deselection;
|
||||
#if 0
|
||||
if (initialPressPosition == d->initialPressPosition)
|
||||
{
|
||||
foreach(const QString &category, d->categories)
|
||||
{
|
||||
if (d->categoryVisualRect(category).contains(event->pos()))
|
||||
{
|
||||
foreach (const QModelIndex &index, d->categoriesIndexes[category])
|
||||
QItemSelection selection;
|
||||
QModelIndexList indexList = d->categoriesIndexes[category];
|
||||
|
||||
foreach (const QModelIndex &index, indexList)
|
||||
{
|
||||
QModelIndex selectIndex = index.model()->index(index.row(), 0);
|
||||
|
||||
if (/*!d->lastSelection.contains(selectIndex)*/)
|
||||
{
|
||||
selection << QItemSelectionRange(selectIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
deselection << QItemSelectionRange(selectIndex);
|
||||
}
|
||||
selection << QItemSelectionRange(selectIndex);
|
||||
}
|
||||
|
||||
selectionModel()->select(selection, QItemSelectionModel::Select);
|
||||
selectionModel()->select(deselection, QItemSelectionModel::Deselect);
|
||||
selectionModel()->select(selection, QItemSelectionModel::SelectCurrent);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (d->hovered.isValid())
|
||||
viewport()->update(visualRect(d->hovered));
|
||||
|
|
Loading…
Reference in a new issue