summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJere Tuliniemi <jere.tuliniemi@qt.io>2020-07-09 12:14:36 +0300
committerJere Tuliniemi <jere.tuliniemi@qt.io>2020-07-23 07:05:05 +0300
commit7243c7627cc0cc3a9f8ff470e7a7c3d9696ce97d (patch)
tree6474f6ad980393cd30d1ca9a6821f0ac830acd24
parentdd9baa255af6aff800e536781bce369fcc8a3547 (diff)
Fix slide rollback when setting timeline value
The slide has to be rolled back so that elements from the slide don't stick around in the next one. Task-number: QT3DS-4146 Change-Id: I18dbf2b974fb55d4fe22b014c06f54f37df02e13 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r--src/runtime/Qt3DSComponentManager.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/runtime/Qt3DSComponentManager.cpp b/src/runtime/Qt3DSComponentManager.cpp
index bf18a64..ff301da 100644
--- a/src/runtime/Qt3DSComponentManager.cpp
+++ b/src/runtime/Qt3DSComponentManager.cpp
@@ -126,10 +126,8 @@ void CComponentManager::GotoSlideIndex(TElement *inComponent,
}
// Update dynamic keys to use current values before slide switching, with the exception of
- // master slides because playback only starts from non-master slides. Skip rollback
- // if we are expecting a gototime command, as rollback overwrites the attribute changes
- // caused by gototime.
- if (theCurrentSlideIndex > 0 && !HasComponentGotoTimeCommand(theComponent)) {
+ // master slides because playback only starts from non-master slides.
+ if (theCurrentSlideIndex > 0) {
m_Presentation.GetSlideSystem().InitializeDynamicKeys(
SSlideKey(*theComponent, (qt3ds::QT3DSU8)theGotoSlideData.m_Slide),
m_Presentation.GetAnimationSystem());
@@ -137,7 +135,7 @@ void CComponentManager::GotoSlideIndex(TElement *inComponent,
m_Presentation.GetSlideSystem().RollbackSlide(
SSlideKey(*inComponent, (qt3ds::QT3DSU8)theCurrentSlideIndex),
m_Presentation.GetAnimationSystem(), m_Presentation.GetLogicSystem());
- } else if (theCurrentSlideIndex == 0){
+ } else {
m_Presentation.GetSlideSystem().ExecuteSlide(SSlideKey(*inComponent, 0),
m_Presentation.GetAnimationSystem(),
m_Presentation.GetLogicSystem());