diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-10-04 15:42:35 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-08 08:02:21 +0200 |
commit | aeb8416d948b69d55dda45ed4ebe85585325fedc (patch) | |
tree | 47590a9df24e66f67719a5f74a4710b8418efd4c /src/quick/util/qquickanimator.cpp | |
parent | 29e3d02c26d264adb2b581b3511d29efb124f331 (diff) |
Several smaller fixes to Animators.
Backwards animations are not supported for animators as the
animation system cannot handle uncontrolled backwards animations.
Make sure we write back values only for the animators that have
run at all.
Clockwise rotation to 0 can easily end up on 360 as a result
the _q_interpolateClockwise function not being entirely correct.
Change-Id: If69b8555a1361f46600a40e80419b65438c18097
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/quick/util/qquickanimator.cpp')
-rw-r--r-- | src/quick/util/qquickanimator.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/quick/util/qquickanimator.cpp b/src/quick/util/qquickanimator.cpp index a5bdd8275b..5ea9a35fe8 100644 --- a/src/quick/util/qquickanimator.cpp +++ b/src/quick/util/qquickanimator.cpp @@ -73,6 +73,10 @@ QT_BEGIN_NAMESPACE also be treated as an Animator and be run on the scene graph's rendering thread when possible. + The Animator types can be used for animations during transitions, but + they do not support the \l {Transition::reversible}{reversible} + property. + The Animator type cannot be used directly in a QML file. It exists to provide a set of common properties and methods, available across all the other animator types that inherit from it. Attempting to use the Animator @@ -263,7 +267,7 @@ void QQuickAnimatorPrivate::apply(QQuickAnimatorJob *job, QAbstractAnimationJob *QQuickAnimator::transition(QQuickStateActions &actions, QQmlProperties &modified, - TransitionDirection, + TransitionDirection direction, QObject *) { Q_D(QQuickAnimator); @@ -273,6 +277,10 @@ QAbstractAnimationJob *QQuickAnimator::transition(QQuickStateActions &actions, return 0; } + // The animation system cannot handle backwards uncontrolled animations. + if (direction == Backward) + return 0; + QQuickAnimatorJob *job = createJob(); if (!job) return 0; |