summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qitemselectionmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/itemviews/qitemselectionmodel.cpp')
-rw-r--r--src/widgets/itemviews/qitemselectionmodel.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/widgets/itemviews/qitemselectionmodel.cpp b/src/widgets/itemviews/qitemselectionmodel.cpp
index 27a4a402e2..0b6445298e 100644
--- a/src/widgets/itemviews/qitemselectionmodel.cpp
+++ b/src/widgets/itemviews/qitemselectionmodel.cpp
@@ -1145,11 +1145,8 @@ void QItemSelectionModel::clearSelection()
Q_D(QItemSelectionModel);
if (d->ranges.count() == 0 && d->currentSelection.count() == 0)
return;
- QItemSelection selection = d->ranges;
- selection.merge(d->currentSelection, d->currentCommand);
- d->ranges.clear();
- d->currentSelection.clear();
- emit selectionChanged(QItemSelection(), selection);
+
+ select(QItemSelection(), Clear);
}