diff options
author | Michael Brasser <michael.brasser@live.com> | 2015-02-02 11:23:31 -0600 |
---|---|---|
committer | Michael Brasser <michael.brasser@live.com> | 2015-02-03 14:46:57 +0000 |
commit | 3b2e59130bf264ec63bf51b2049989f697d91ca1 (patch) | |
tree | 0e58a0762a92982d6e3204328e3b287b8cf8203f /src/quick/items | |
parent | 81b876b7177cf0d55b7c009342e501bfa900175c (diff) |
Fix Text wrapping when growing from 0 width.
The fix for QTBUG-30896 caused a regression in the test case. Now check
both width and implicit width validity before resetting widthExceeded.
Change-Id: I4aba2aad299746906cfe20e288fa60cfe2acc64f
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Diffstat (limited to 'src/quick/items')
-rw-r--r-- | src/quick/items/qquicktext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index be86b2976b..bff38879cf 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -955,7 +955,7 @@ QRectF QQuickTextPrivate::setupTextLayout(qreal *const baseline) // If the horizontal alignment is not left and the width was not valid we need to relayout // now that we know the maximum line width. - if (!implicitWidthValid && unwrappedLineCount > 1 && q->effectiveHAlign() != QQuickText::AlignLeft) { + if (!q->widthValid() && !implicitWidthValid && unwrappedLineCount > 1 && q->effectiveHAlign() != QQuickText::AlignLeft) { widthExceeded = false; heightExceeded = false; continue; |