summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeloader.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-02-02 01:20:29 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-02-02 01:20:29 (GMT)
commit501180c6fbed0857126da2bb0ff1f17ee35472c6 (patch)
tree74f8b6c25c955e0e23d27dfde4962525c309c7ae /src/declarative/graphicsitems/qdeclarativeloader.cpp
parente09cd7062bb50067eb2d2db9197eb9d4ee170360 (diff)
downloadQt-501180c6fbed0857126da2bb0ff1f17ee35472c6.zip
Qt-501180c6fbed0857126da2bb0ff1f17ee35472c6.tar.gz
Qt-501180c6fbed0857126da2bb0ff1f17ee35472c6.tar.bz2
Make sure we update Loader size if item size changes after creation.
Task-number: QTBUG-17114 Reviewed-by: Bea Lam
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeloader.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
index 562ef08..6c1f1be 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
@@ -59,8 +59,13 @@ QDeclarativeLoaderPrivate::~QDeclarativeLoaderPrivate()
void QDeclarativeLoaderPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem, const QRectF &newGeometry, const QRectF &oldGeometry)
{
- if (resizeItem == item)
+ if (resizeItem == item) {
+ if (!updatingSize && newGeometry.width() != oldGeometry.width())
+ itemWidthValid = true;
+ if (!updatingSize && newGeometry.height() != oldGeometry.height())
+ itemHeightValid = true;
_q_updateSize(false);
+ }
QDeclarativeItemChangeListener::itemGeometryChanged(resizeItem, newGeometry, oldGeometry);
}