From 6f2c46807e1d74efefd907643f5cb7cdc217598a Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Tue, 16 Sep 2014 14:57:10 +0200 Subject: [PATCH] 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. --- src/plasmaquick/dialog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plasmaquick/dialog.cpp b/src/plasmaquick/dialog.cpp index c56fc7f36..c9f617515 100644 --- a/src/plasmaquick/dialog.cpp +++ b/src/plasmaquick/dialog.cpp @@ -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);