From: Matthew Vogt Date: Mon, 9 Jul 2012 04:54:18 +0000 (+1000) Subject: Fix qmlscene initial resize for delayed loading X-Git-Tag: 1.0_branch~265 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f18fb076b6196b195d953f050e6e150954372be6;p=profile%2Fivi%2Fqtdeclarative.git Fix qmlscene initial resize for delayed loading When QQuickView acquires a default initial size while waiting for the source component to be loaded, the resulting width() and height() are 1 rather than zero. Fix the check for default size after component has loaded to account for this disparity. Change-Id: Ifaf418525e66dcc094c87ac1f9b63d1b05a08fd7 Reviewed-by: Martin Jones --- diff --git a/src/quick/items/qquickview.cpp b/src/quick/items/qquickview.cpp index 0322caf..52c9959 100644 --- a/src/quick/items/qquickview.cpp +++ b/src/quick/items/qquickview.cpp @@ -483,8 +483,8 @@ void QQuickViewPrivate::setRootObject(QObject *obj) } if (root) { initialSize = rootObjectSize(); - if ((resizeMode == QQuickView::SizeViewToRootObject || !q->width() || !q->height()) - && initialSize != q->size()) { + if ((resizeMode == QQuickView::SizeViewToRootObject || q->width() <= 1 || q->height() <= 1) && + initialSize != q->size()) { q->resize(initialSize); } initResize();