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 <yann.bodson@nokia.com>
This commit is contained in:
Andrew den Exter 2012-04-27 11:30:34 +10:00 committed by Qt by Nokia
parent a701746515
commit 1770fa632f
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}