diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-03-01 23:02:37 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-03-01 23:02:37 (GMT) |
commit | ed13b84dc515e6d0971bd455dd38dad11a7aed95 (patch) | |
tree | b357480771a23e394249eff4fd0d7ce11c6b1cca /src | |
parent | 0d8a94c74a8799b278d32d9cf0c32dee7cd35d11 (diff) | |
parent | 172df566d0ff512012afbc5039535e532868a1e5 (diff) | |
download | Qt-ed13b84dc515e6d0971bd455dd38dad11a7aed95.zip Qt-ed13b84dc515e6d0971bd455dd38dad11a7aed95.tar.gz Qt-ed13b84dc515e6d0971bd455dd38dad11a7aed95.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeflickable_p_p.h | 6 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeitem.cpp | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h index 1ff4f92..ad7a04d 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h @@ -134,8 +134,10 @@ public: Velocity(QDeclarativeFlickablePrivate *p) : parent(p) {} virtual void setValue(qreal v) { - QDeclarativeTimeLineValue::setValue(v); - parent->updateVelocity(); + if (v != value()) { + QDeclarativeTimeLineValue::setValue(v); + parent->updateVelocity(); + } } QDeclarativeFlickablePrivate *parent; }; diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index c282808..f48c761 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -1730,8 +1730,12 @@ void QDeclarativeItem::geometryChanged(const QRectF &newGeometry, if (d->_anchors) d->_anchors->d_func()->updateMe(); - if (transformOrigin() != QDeclarativeItem::TopLeft) - setTransformOriginPoint(d->computeTransformOrigin()); + if (transformOrigin() != QDeclarativeItem::TopLeft + && (newGeometry.width() != oldGeometry.width() || newGeometry.height() != oldGeometry.height())) { + QPointF origin = d->computeTransformOrigin(); + if (transformOriginPoint() != origin) + setTransformOriginPoint(origin); + } if (newGeometry.x() != oldGeometry.x()) emit xChanged(); |