diff options
Diffstat (limited to 'src/declarative/graphicsitems')
-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(); |