If the text is not left aligned and the width changes during layout due
to implictWidth changing, the text needs to be laid out again.
Task-number: QTBUG-40161
Change-Id: I1ad679ccdc5595dd749600abe08ed46ac179d7bf
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
maxHeight = q->heightValid() ? q->height() : FLT_MAX;
// If the width of the item has changed and it's possible the result of wrapping,
- // eliding, or scaling has changed do another layout.
+ // eliding, scaling has changed, or the text is not left aligned do another layout.
if ((lineWidth < qMin(oldWidth, naturalWidth) || (widthExceeded && lineWidth > oldWidth))
- && (singlelineElide || multilineElide || canWrap || horizontalFit)) {
+ && (singlelineElide || multilineElide || canWrap || horizontalFit
+ || q->effectiveHAlign() != QQuickText::AlignLeft)) {
widthExceeded = false;
heightExceeded = false;
continue;