diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-09-09 05:50:02 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-09-09 05:50:02 (GMT) |
commit | 8d130f26d9ef1e3acd76c0c158b41b8d2b3c1b44 (patch) | |
tree | 3091de8c876c9ad7cf2d611a8884c653e748aa43 /src/declarative | |
parent | 969c3c13217bc5eb98c77f1674269bed1cc102e2 (diff) | |
download | Qt-8d130f26d9ef1e3acd76c0c158b41b8d2b3c1b44.zip Qt-8d130f26d9ef1e3acd76c0c158b41b8d2b3c1b44.tar.gz Qt-8d130f26d9ef1e3acd76c0c158b41b8d2b3c1b44.tar.bz2 |
Fix reversingModes of QDeclarativeSmoothedAnimation
None of them actually worked. The updated visual test now shows the
correct behavior.
Task-number: QTBUG-13513
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/util/qdeclarativesmoothedanimation.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp index b2f02e6..c3fa7cf 100644 --- a/src/declarative/util/qdeclarativesmoothedanimation.cpp +++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp @@ -214,22 +214,23 @@ void QSmoothedAnimation::init() } bool hasReversed = trackVelocity != 0. && - ((trackVelocity > 0) == ((initialValue - to) > 0)); + ((!invert) == ((initialValue - to) > 0)); if (hasReversed) { switch (reversingMode) { default: case QDeclarativeSmoothedAnimation::Eased: + initialVelocity = -trackVelocity; break; case QDeclarativeSmoothedAnimation::Sync: QDeclarativePropertyPrivate::write(target, to, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + trackVelocity = 0; stop(); return; case QDeclarativeSmoothedAnimation::Immediate: initialVelocity = 0; - delayedStop(); break; } } |