summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@crimson.no>2017-10-23 15:03:05 +0200
committerGunnar Sletta <gunnar@crimson.no>2017-11-10 10:29:11 +0000
commit6990ae6c1bad32952e371fa72bee65a7af11c313 (patch)
treea8ad6c42f99685ef222504ed1b2255b0f0b7c960
parent5f16aa795d39969d93b520861a1e86729c7db90e (diff)
Make sure we remove stopped animators from the list of roots
Change-Id: I89b36ee7d03ac6b8d07b24c656d3311728e8f9c3 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
-rw-r--r--src/quick/util/qquickanimatorcontroller.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/util/qquickanimatorcontroller.cpp b/src/quick/util/qquickanimatorcontroller.cpp
index 3f7347c01d..5cf8051922 100644
--- a/src/quick/util/qquickanimatorcontroller.cpp
+++ b/src/quick/util/qquickanimatorcontroller.cpp
@@ -123,8 +123,10 @@ static void qquickanimator_sync_before_start(QAbstractAnimationJob *job)
void QQuickAnimatorController::beforeNodeSync()
{
- for (const QSharedPointer<QAbstractAnimationJob> &toStop : qAsConst(m_rootsPendingStop))
+ for (const QSharedPointer<QAbstractAnimationJob> &toStop : qAsConst(m_rootsPendingStop)) {
toStop->stop();
+ m_animationRoots.remove(toStop.data());
+ }
m_rootsPendingStop.clear();