summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-10-30 11:40:13 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-10-30 11:40:13 (GMT)
commit85b7896a47f9bb622b394107769cb7c1121a6995 (patch)
treedff8d9d8bceb93a54b17e66b833e809e226c8c6a /src/gui
parentc726e83aebf2252b5a94444d5d61e03ef2033437 (diff)
downloadQt-85b7896a47f9bb622b394107769cb7c1121a6995.zip
Qt-85b7896a47f9bb622b394107769cb7c1121a6995.tar.gz
Qt-85b7896a47f9bb622b394107769cb7c1121a6995.tar.bz2
QItemSelectionModel could emit selectionChanged with no change
Task-number: QTBUG-560 Reviewed-by: ogoffart
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemviews/qitemselectionmodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/itemviews/qitemselectionmodel.cpp b/src/gui/itemviews/qitemselectionmodel.cpp
index f2ccb6e..c6e02a6 100644
--- a/src/gui/itemviews/qitemselectionmodel.cpp
+++ b/src/gui/itemviews/qitemselectionmodel.cpp
@@ -1587,7 +1587,8 @@ void QItemSelectionModel::emitSelectionChanged(const QItemSelection &newSelectio
}
}
- emit selectionChanged(selected, deselected);
+ if (!selected.isEmpty() || !deselected.isEmpty())
+ emit selectionChanged(selected, deselected);
}
#ifndef QT_NO_DEBUG_STREAM