Dialog: updateLayoutParameters after calling syncToMainItemSize
updateLayoutParameters's uses the borders in order to set the max and minimum size, and therefore syncToMainItemSize should always be called before it is ever called. Also added code to not do anything if we are not completely initialized.
This commit is contained in:
parent
18a6a7302b
commit
6f2c46807e
@ -239,6 +239,9 @@ void DialogPrivate::updateVisibility(bool visible)
|
||||
cachedGeometry = QRect();
|
||||
}
|
||||
syncToMainItemSize();
|
||||
if (mainItemLayout) {
|
||||
updateLayoutParameters();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -424,7 +427,7 @@ void DialogPrivate::updateMaximumHeight()
|
||||
|
||||
void DialogPrivate::updateLayoutParameters()
|
||||
{
|
||||
if (!componentComplete) {
|
||||
if (!componentComplete || !mainItem || !q->isVisible()) {
|
||||
return;
|
||||
}
|
||||
Q_ASSERT(mainItem);
|
||||
|
Loading…
Reference in New Issue
Block a user