From: Andrew den Exter Date: Fri, 27 Apr 2012 01:30:34 +0000 (+1000) Subject: Don't do a layout for wrapping if there is no width binding. X-Git-Tag: 071012131707~522 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1770fa632facf2f1e4bb05e7689efc939d46cfef;p=profile%2Fivi%2Fqtdeclarative.git Don't do a layout for wrapping if there is no width binding. If no width has been set on the TextEdit then the text will never wrap so we can skip the layout on geometry changed. Task-number: QTBUG-25489 Change-Id: I3aa8dcedeeed0792f3135a4a01f90f24941d01b3 Reviewed-by: Yann Bodson --- diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index 6fefab4..59d78ac 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -1144,7 +1144,7 @@ void QQuickTextEdit::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { Q_D(QQuickTextEdit); - if (newGeometry.width() != oldGeometry.width() && d->wrapMode != NoWrap && !d->inLayout) { + if (newGeometry.width() != oldGeometry.width() && d->wrapMode != NoWrap && widthValid() && !d->inLayout) { updateSize(); moveCursorDelegate(); }