diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-10-03 08:52:39 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-03 17:48:34 +0200 |
commit | 9098f6959d4befbe867dfc244c32cd080ec2fa36 (patch) | |
tree | 89af2290dea4ee4ec2e9b124b518322e407f7d4e /src/quick | |
parent | 558d7c2b798ad72c217a79a5b9d300877ec12363 (diff) |
Make sure we apply the last transformation step.
Change-Id: Ie9b9a04cf41033bb475875f419b16ce91f6a477d
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/util/qquickanimatorcontroller.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/quick/util/qquickanimatorcontroller.cpp b/src/quick/util/qquickanimatorcontroller.cpp index 1508797680..82c66b431d 100644 --- a/src/quick/util/qquickanimatorcontroller.cpp +++ b/src/quick/util/qquickanimatorcontroller.cpp @@ -74,13 +74,12 @@ void QQuickAnimatorController::advance() running = true; } - for (QSet<QQuickAnimatorJob *>::const_iterator it = activeLeafAnimations.constBegin(); - it != activeLeafAnimations.constEnd(); ++it) { - QQuickAnimatorJob *job = *it; - if (job->isTransform() && job->target()) { - QQuickTransformAnimatorJob *xform = static_cast<QQuickTransformAnimatorJob *>(*it); - xform->transformHelper()->apply(); - } + // It was tempting to only run over the active animations, but we need to push + // the values for the transforms that finished in the last frame and those will + // have been removed already... + for (QHash<QQuickItem *, QQuickTransformAnimatorJob::Helper *>::const_iterator it = transforms.constBegin(); + it != transforms.constEnd(); ++it) { + (*it)->apply(); } if (running) |