diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2010-12-12 21:11:23 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2011-03-15 17:34:43 (GMT) |
commit | e3cd651d92a9e550fe52360d1be6ae41d0f2ab85 (patch) | |
tree | 8054abc8dd4848bfe8a8cf9cca4bdf220aa2f514 /src/gui/itemviews | |
parent | 306d16002220b99ad386fb1255034b94861a8c9f (diff) | |
download | Qt-e3cd651d92a9e550fe52360d1be6ae41d0f2ab85.zip Qt-e3cd651d92a9e550fe52360d1be6ae41d0f2ab85.tar.gz Qt-e3cd651d92a9e550fe52360d1be6ae41d0f2ab85.tar.bz2 |
Use the virtual API to clear a selection.
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Merge-request: 980
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r-- | src/gui/itemviews/qitemselectionmodel.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/itemviews/qitemselectionmodel.cpp b/src/gui/itemviews/qitemselectionmodel.cpp index 27a4a40..0b64452 100644 --- a/src/gui/itemviews/qitemselectionmodel.cpp +++ b/src/gui/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); } |