summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews
diff options
context:
space:
mode:
authorThorbjørn Lund Martsum <tmartsum@gmail.com>2012-10-25 06:49:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-26 15:23:46 +0200
commit4fbdb969fb4e446eab01f27eb2c880f8d6cb9106 (patch)
tree3816bdd9a3aaaa5f40588f44c1c7ec40291fd22c /src/widgets/itemviews
parent67cabd464dfe567c11f2d8fc4a1ced7a7c05e5dc (diff)
QHeaderView 5.0 - no emit of sortIndicatorChanged when unchanged
There is no reason to emit this when there is no change. Change-Id: I34f0ceec7c4b0959b77bc5be3ce2c2ad55864598 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/widgets/itemviews')
-rw-r--r--src/widgets/itemviews/qheaderview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index 08f10defb8..e7e3a58670 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -1349,6 +1349,8 @@ void QHeaderView::setSortIndicator(int logicalIndex, Qt::SortOrder order)
// This is so that people can set the position of the sort indicator before the fill the model
int old = d->sortIndicatorSection;
+ if (old == logicalIndex && order == d->sortIndicatorOrder)
+ return;
d->sortIndicatorSection = logicalIndex;
d->sortIndicatorOrder = order;