summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-09-09 05:50:02 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-09-09 05:50:02 (GMT)
commit8d130f26d9ef1e3acd76c0c158b41b8d2b3c1b44 (patch)
tree3091de8c876c9ad7cf2d611a8884c653e748aa43 /src/declarative
parent969c3c13217bc5eb98c77f1674269bed1cc102e2 (diff)
downloadQt-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.cpp5
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;
}
}