diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-10-15 01:32:07 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-10-15 01:32:07 (GMT) |
commit | 8c48c7b9bca8074c48b78f6d089a3882b2d73a9d (patch) | |
tree | e723bea7e7ef68d1780daef7793f6ccd1d7ddb31 /src/declarative | |
parent | 0fd2be8bc43af85e59963235ce75fcf989b42768 (diff) | |
download | Qt-8c48c7b9bca8074c48b78f6d089a3882b2d73a9d.zip Qt-8c48c7b9bca8074c48b78f6d089a3882b2d73a9d.tar.gz Qt-8c48c7b9bca8074c48b78f6d089a3882b2d73a9d.tar.bz2 |
Recalculate Text Element's alignment when width changes
Task-number: QTBUG-14463
Reviewed-by: Aaron Kennedy
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetext.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 308aefa..22282d2 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -1143,9 +1143,10 @@ QRectF QDeclarativeText::boundingRect() const void QDeclarativeText::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { Q_D(QDeclarativeText); - if (!d->internalWidthUpdate && newGeometry.width() != oldGeometry.width() && - (d->wrapMode != QDeclarativeText::NoWrap || d->elideMode != QDeclarativeText::ElideNone)) { - + if ((!d->internalWidthUpdate && newGeometry.width() != oldGeometry.width()) + && (d->wrapMode != QDeclarativeText::NoWrap + || d->elideMode != QDeclarativeText::ElideNone + || d->hAlign != Qt::AlignLeft)) { if (d->singleline && d->elideMode != QDeclarativeText::ElideNone && widthValid()) { // We need to re-elide d->updateLayout(); |