QHeaderView 5.0 - no emit of sortIndicatorChanged when unchanged
[profile/ivi/qtbase.git] / src / widgets / itemviews / qheaderview.cpp
index 08f10de..e7e3a58 100644 (file)
@@ -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;