diff options
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeanchors.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeanchors.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors.cpp b/src/declarative/graphicsitems/qdeclarativeanchors.cpp index 274d778..dc1f09d 100644 --- a/src/declarative/graphicsitems/qdeclarativeanchors.cpp +++ b/src/declarative/graphicsitems/qdeclarativeanchors.cpp @@ -168,8 +168,7 @@ void QDeclarativeAnchorsPrivate::fillChanged() } else if (fill->parentItem() == item->parentItem()) { //siblings setItemPos(QPointF(fill->x()+leftMargin, fill->y()+topMargin)); } - setItemWidth(fill->width()-leftMargin-rightMargin); - setItemHeight(fill->height()-topMargin-bottomMargin); + setItemSize(QSizeF(fill->width()-leftMargin-rightMargin, fill->height()-topMargin-bottomMargin)); --updatingFill; } else { @@ -314,6 +313,13 @@ void QDeclarativeAnchorsPrivate::setItemPos(const QPointF &v) updatingMe = false; } +void QDeclarativeAnchorsPrivate::setItemSize(const QSizeF &v) +{ + updatingMe = true; + item->setSize(v); + updatingMe = false; +} + void QDeclarativeAnchorsPrivate::updateMe() { if (updatingMe) { |