summaryrefslogtreecommitdiffstats
path: root/src/layouts
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2014-01-15 13:22:12 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-28 12:13:52 +0100
commit17788ca8f0d6fe4fb0d03e99e34ed667fde54379 (patch)
treea10790a239ff94cca7d2df096bbdb9c18f2a8d29 /src/layouts
parent5dc805c86077ee9cd10af530f802fdda879cfb6a (diff)
Allow size hint changes during a rearrange.
Previously, we marked the layout as not dirty straight after a rearrange was done. However, in the case of when a size hint changed during a rearrange that would block the pending rearrange (since it only perform the actual rearrange if its dirty). Instead, mark the layout as not dirty *before* the rearrange. This will allow bindings such as implicitWidth: height to execute the pending rearrange. (Although such bindings are not encouraged) Task-number: QTBUG-36169 Change-Id: I75bd821a0ca4302026bd5dac01287ca3359d471b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/layouts')
-rw-r--r--src/layouts/qquicklinearlayout.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/layouts/qquicklinearlayout.cpp b/src/layouts/qquicklinearlayout.cpp
index 554ce10ca..c15f2ed4b 100644
--- a/src/layouts/qquicklinearlayout.cpp
+++ b/src/layouts/qquicklinearlayout.cpp
@@ -499,9 +499,11 @@ void QQuickGridLayoutBase::rearrange(const QSizeF &size)
qSwap(left, right);
*/
+ // Set m_dirty to false in case size hint changes during arrangement.
+ // This could happen if there is a binding like implicitWidth: height
+ QQuickLayout::rearrange(size);
d->engine.setGeometries(QRectF(QPointF(0,0), size));
- QQuickLayout::rearrange(size);
}
bool QQuickGridLayoutBase::shouldIgnoreItem(QQuickItem *child, QQuickLayoutAttached *&info, QSizeF *sizeHints)