diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-04-08 01:31:57 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-04-08 05:06:11 (GMT) |
commit | 74595d1d6156603fc29090a96e0f0d066756bbe6 (patch) | |
tree | 8e0a6f7d515d26c2bfdaafa009948d94377ca9ee /src/declarative | |
parent | 20f614ccfa7657da7e9d585de34c578cef659920 (diff) | |
download | Qt-74595d1d6156603fc29090a96e0f0d066756bbe6.zip Qt-74595d1d6156603fc29090a96e0f0d066756bbe6.tar.gz Qt-74595d1d6156603fc29090a96e0f0d066756bbe6.tar.bz2 |
Tracking the velocity when restarting SmoothedAnimation
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/util/qdeclarativesmoothedanimation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp index f21b0c7..48a7583 100644 --- a/src/declarative/util/qdeclarativesmoothedanimation.cpp +++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp @@ -69,6 +69,7 @@ QSmoothedAnimation::QSmoothedAnimation(QObject *parent) void QSmoothedAnimation::restart() { + initialVelocity = trackVelocity; if (state() != QAbstractAnimation::Running) start(); else @@ -224,6 +225,7 @@ void QSmoothedAnimation::init() QDeclarativePropertyPrivate::write(target, to, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + stop(); return; case QDeclarativeSmoothedAnimation::Immediate: initialVelocity = 0; |