From 53bdf7daa1c598082dfde8bfbf40709f37f866e6 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Mon, 10 Jun 2013 21:17:02 +1000 Subject: [PATCH] Ensure the vertical text alignment is updated when the Text height changes. Task-number: QTBUG-31647 Change-Id: Ia0968a7a40c40411df5b3ed841a42f6cef141525 Reviewed-by: Andrew Knight Reviewed-by: Vesa Halttunen Reviewed-by: Alan Alpert --- 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 fbf46f5..b46f2e5 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(); } -- 1.7.2.5