summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMauro Persano <mauro.persano@kdab.com>2021-09-28 18:05:57 -0300
committerMauro Persano <mauro.persano@kdab.com>2021-09-29 09:01:28 -0300
commit185dd8b27457a40cafa72ad77ead642487e4648b (patch)
treecf2b0adfd48f4adfb993737694a9d0c441e63413 /src
parenta2fc5a0a7bad679cf5e4bea48e837af4d1bb030f (diff)
Reset ClipAnimator loop counter on cleanup
Otherwise, if a backend node with a loop counter larger than 1 is reused for a non-looping animation, the animation won't get played. Pick-to: 6.2 Change-Id: I5b043b9c844bba9b04edc5db383bdf0e3b92fe87 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/animation/backend/clipanimator.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/animation/backend/clipanimator.cpp b/src/animation/backend/clipanimator.cpp
index 997d3d13b..2b1cffe09 100644
--- a/src/animation/backend/clipanimator.cpp
+++ b/src/animation/backend/clipanimator.cpp
@@ -115,6 +115,7 @@ void ClipAnimator::cleanup()
m_running = false;
m_loops = 1;
m_clipFormat = ClipFormat();
+ m_currentLoop = 0;
m_normalizedLocalTime = m_lastNormalizedLocalTime = -1.0f;
}