diff options
author | Andrew den Exter <andrew.den.exter@jollamobile.com> | 2013-06-10 21:17:02 +1000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-11 01:47:56 +0200 |
commit | 53bdf7daa1c598082dfde8bfbf40709f37f866e6 (patch) | |
tree | 7dcd4d533971737aac5849441811f0a657565681 /src | |
parent | c72dd024ba7d9221493983a87cc6fc148d648c55 (diff) |
Ensure the vertical text alignment is updated when the Text height changes.
Task-number: QTBUG-31647
Change-Id: Ia0968a7a40c40411df5b3ed841a42f6cef141525
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Vesa Halttunen
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquicktext.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index fbf46f51e4..b46f2e5ab9 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -2155,9 +2155,10 @@ void QQuickText::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeo if ((!widthChanged && !heightChanged) || d->internalWidthUpdate) goto geomChangeDone; - if (effectiveHAlign() != QQuickText::AlignLeft && widthChanged) { + if ((effectiveHAlign() != QQuickText::AlignLeft && widthChanged) + || vAlign() != QQuickText::AlignTop && heightChanged) { // If the width has changed and we're not left aligned do an update so the text is - // repositioned even if a full layout isn't required. + // repositioned even if a full layout isn't required. And the same for vertical. d->updateType = QQuickTextPrivate::UpdatePaintNode; update(); } |