summaryrefslogtreecommitdiffstats
path: root/src/runtime/q3dsanimationmanager.cpp
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@qt.io>2018-10-18 17:19:25 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-10-29 13:21:25 +0000
commit55b43d3e1c3a100f4ad41d94c132afd2a0d029b3 (patch)
treed3c88760174e575607c1b27eea10f7912e400efd /src/runtime/q3dsanimationmanager.cpp
parent5e9132d5f61385ce5d624c6f5db2f136a1bb8c84 (diff)
Improve state handling
This is an attempt to clean up and make the state changes more sane, i.e., by trying do everything once and in the right order. There are still ugliness in this code, but it should be more easily to follow now, aided by extra inline commentary. This change should also improve some of the flickering seen in some examples when changing slides, as we try avoid re-setting stuff when we don't need to. Since time updates for the new slide is deferred until the first time callback, some of the test needed to be changed to their QTRY_* version. Also, there's now a clear distinction between stopped and paused, where paused means the slides progress is stopped at time t, as expected and stopped means the slides values and state is reset to it's initial state. Task-number: QT3DS-1866 Change-Id: I7a9b61ee3ad4a976e0e8d4de386704dcf0d526bf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/runtime/q3dsanimationmanager.cpp')
-rw-r--r--src/runtime/q3dsanimationmanager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/q3dsanimationmanager.cpp b/src/runtime/q3dsanimationmanager.cpp
index 6a33cae..e6bba81 100644
--- a/src/runtime/q3dsanimationmanager.cpp
+++ b/src/runtime/q3dsanimationmanager.cpp
@@ -475,7 +475,7 @@ void Q3DSAnimationManager::clearAnimations(Q3DSSlide *slide)
// Remove all other animatiors that was associated with this slide
Q3DSSlideAttached *slideAttached = static_cast<Q3DSSlideAttached *>(slide->attached());
for (auto animator : slideAttached->animators) {
- Q_ASSERT(!animator->isRunning());
+ animator->stop();
slideAttached->entity->removeComponent(animator);
delete animator;
}