summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/runtime/Qt3DSActivationManager.cpp3
-rw-r--r--src/runtime/Qt3DSComponentManager.cpp5
-rw-r--r--src/runtime/Qt3DSComponentManager.h1
-rw-r--r--src/runtime/Qt3DSIComponentManager.h1
4 files changed, 9 insertions, 1 deletions
diff --git a/src/runtime/Qt3DSActivationManager.cpp b/src/runtime/Qt3DSActivationManager.cpp
index cf14820..6d35f4d 100644
--- a/src/runtime/Qt3DSActivationManager.cpp
+++ b/src/runtime/Qt3DSActivationManager.cpp
@@ -683,7 +683,8 @@ struct STimeContext
Mutex::ScopedLock __locker(m_ElementAccessMutex);
// When the component is activated the first time go to the first slide
// Subsequent activations should continue from the deactivated slide
- if (theContextNode.GetCurrentSlide() == 0) {
+ if (theContextNode.GetCurrentSlide() == 0
+ || inComponentManager.hasSlideChangeQueued(&theContextNode)) {
inComponentManager.GotoSlideIndex(&theContextNode, 1, false);
inComponentManager.applyQueuedChanges(&theContextNode);
}
diff --git a/src/runtime/Qt3DSComponentManager.cpp b/src/runtime/Qt3DSComponentManager.cpp
index 184576f..8f33ec8 100644
--- a/src/runtime/Qt3DSComponentManager.cpp
+++ b/src/runtime/Qt3DSComponentManager.cpp
@@ -340,6 +340,11 @@ void CComponentManager::queueChange(TElement *component, TElement *target, const
}
}
+bool CComponentManager::hasSlideChangeQueued(TElement *component)
+{
+ return m_ComponentInitialSlideMap.find(component) != m_ComponentInitialSlideMap.end();
+}
+
//==============================================================================
/**
* Performs a switch to the previous slide.
diff --git a/src/runtime/Qt3DSComponentManager.h b/src/runtime/Qt3DSComponentManager.h
index 108640b..6ede073 100644
--- a/src/runtime/Qt3DSComponentManager.h
+++ b/src/runtime/Qt3DSComponentManager.h
@@ -94,6 +94,7 @@ public: // Slide
void applyQueuedChanges(TElement *component) override;
void queueChange(TElement *component, TElement *target, const char *attName,
const char *value) override;
+ bool hasSlideChangeQueued(TElement *component) override;
UINT8 GetSlideCount(TElement *inComponent) override;
UINT8 GetCurrentSlide(TElement *inComponent) override;
diff --git a/src/runtime/Qt3DSIComponentManager.h b/src/runtime/Qt3DSIComponentManager.h
index be94f7e..50afe05 100644
--- a/src/runtime/Qt3DSIComponentManager.h
+++ b/src/runtime/Qt3DSIComponentManager.h
@@ -123,6 +123,7 @@ public: // Slides
virtual void applyQueuedChanges(TElement *component) = 0;
virtual void queueChange(TElement *component, TElement *target, const char *attName,
const char *value) = 0;
+ virtual bool hasSlideChangeQueued(TElement *component) = 0;
virtual void OnElementDeactivated(TElement *inElement) = 0;