From 6f304112998fd27a938469087c8459ba093fc9dc Mon Sep 17 00:00:00 2001 From: Tony Leinonen Date: Tue, 9 Mar 2021 13:13:45 +0200 Subject: Apply queued changed when object is active MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Queued changes were only applied when the object was first activated. Moving the function call outside if applies changes when the item is active. Task-number: QT3DS-4221 Change-Id: I9bf7a5f262e08a3e2e290106f1dfcfd791064d8a Reviewed-by: Antti Määttä Reviewed-by: Tomi Korpipää Reviewed-by: Qt CI Bot --- src/runtime/Qt3DSActivationManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime/Qt3DSActivationManager.cpp b/src/runtime/Qt3DSActivationManager.cpp index 0e7ad6c..f03eff1 100644 --- a/src/runtime/Qt3DSActivationManager.cpp +++ b/src/runtime/Qt3DSActivationManager.cpp @@ -689,14 +689,16 @@ 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 || inComponentManager.hasSlideChangeQueued(&theContextNode)) { inComponentManager.GotoSlideIndex(&theContextNode, 1, false); - inComponentManager.applyQueuedChanges(&theContextNode); } + inComponentManager.applyQueuedChanges(&theContextNode); } else RemoveOverride(); } + if (isActive) { QT3DS_PERF_SCOPED_TIMER(inPerfTimer, "ActivationManager: Update Local Time") bool atEndOfTime = CalculateNewTime(inGlobalTime); -- cgit v1.2.3