From fdda73198193d2b297a020f6595e3610a4efc109 Mon Sep 17 00:00:00 2001 From: Tony Leinonen Date: Wed, 10 Feb 2021 14:15:14 +0200 Subject: Fix if structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Last structure did not work exactly as intented. Task-number: QT3DS-4214 Change-Id: I5b691b5385c81eff7b6134268918b3c7b84a29da Reviewed-by: Janne Koskinen Reviewed-by: Tomi Korpipää Reviewed-by: Antti Määttä --- src/runtime/Qt3DSComponentManager.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/runtime/Qt3DSComponentManager.cpp b/src/runtime/Qt3DSComponentManager.cpp index 27d75e1..38eeeac 100644 --- a/src/runtime/Qt3DSComponentManager.cpp +++ b/src/runtime/Qt3DSComponentManager.cpp @@ -85,13 +85,11 @@ void CComponentManager::GotoSlideIndex(TElement *inComponent, return; } - if (theComponent->GetActive()) { - if (!theComponent->IsAnyParentAboutToActivate()) { - if (theComponent->AboutToDeactivate()) { - // When (becoming) not active, don't proceed slide switching - m_ComponentInitialSlideMap[inComponent] = inGotoData; - return; - } + if (!theComponent->IsAnyParentAboutToActivate()) { + if (!theComponent->GetActive() || theComponent->AboutToDeactivate()) { + // When (becoming) not active, don't proceed slide switching + m_ComponentInitialSlideMap[inComponent] = inGotoData; + return; } } -- cgit v1.2.3