summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2016-04-02 20:48:43 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2016-04-05 08:14:04 +0000
commit4faadb3ad351b1654902ba9564df9789f727621e (patch)
tree2327bf77b84bf05bdc4870d859f4f67550e2e861
parenta7b0cb467ca5c4a9447d049910c9e3f0abc5897c (diff)
QHeaderView::setStretchLastSection: make it a noop when setting the same value
For some reason this setter wasn't protected against setting the same value again, and always did work (including resizing the last section when setting it to false). Change-Id: I044404eef95d52d165100254f3afd489997e0872 Task-number: QTBUG-52308 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
-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 338627c79f..f04d580030 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -1473,6 +1473,8 @@ bool QHeaderView::stretchLastSection() const
void QHeaderView::setStretchLastSection(bool stretch)
{
Q_D(QHeaderView);
+ if (d->stretchLastSection == stretch)
+ return;
d->stretchLastSection = stretch;
if (d->state != QHeaderViewPrivate::NoState)
return;