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>bb10
parent
a7b0cb467c
commit
4faadb3ad3
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue