diff options
author | Tony Leinonen <tony.leinonen@qt.io> | 2021-03-09 13:13:45 +0200 |
---|---|---|
committer | Tony Leinonen <tony.leinonen@qt.io> | 2021-03-19 16:42:27 +0200 |
commit | 6f304112998fd27a938469087c8459ba093fc9dc (patch) | |
tree | b8d82ea4a2e20924f8ee69a13f962170996db6df | |
parent | f033b04d692ffd8527c7891a2b9f739983139fa7 (diff) |
Apply queued changed when object is active
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ä <antti.maatta@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r-- | src/runtime/Qt3DSActivationManager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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); |