diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/runtime/Qt3DSComponentManager.cpp | 11 | ||||
-rw-r--r-- | src/runtime/Qt3DSElementSystem.h | 20 |
2 files changed, 6 insertions, 25 deletions
diff --git a/src/runtime/Qt3DSComponentManager.cpp b/src/runtime/Qt3DSComponentManager.cpp index 68e6ecd..f20176b 100644 --- a/src/runtime/Qt3DSComponentManager.cpp +++ b/src/runtime/Qt3DSComponentManager.cpp @@ -85,11 +85,12 @@ void CComponentManager::GotoSlideIndex(TElement *inComponent, return; } - if (!theComponent->GetActive() || !theComponent->IsExplicitActive() - || !theComponent->areAllParentsActive()) { - // 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; + } } SComponentGotoSlideData theGotoSlideData(inGotoData); diff --git a/src/runtime/Qt3DSElementSystem.h b/src/runtime/Qt3DSElementSystem.h index 2632d9d..22cf66c 100644 --- a/src/runtime/Qt3DSElementSystem.h +++ b/src/runtime/Qt3DSElementSystem.h @@ -477,26 +477,6 @@ namespace runtime { return !IsExplicitActive(); } - bool areAllParentsActive() - { - SElement *parent = GetParent(); - if (parent) { - bool isActive = parent->GetActive(); - if (!isActive) - isActive = parent->AboutToActivate(); - if (Depth() > 2) { - if (isActive) - isActive = parent->areAllParentsActive(); - } else { - return true; - } - return isActive; - } else { - return true; - } - return false; - } - bool IsAnyParentAboutToActivate() { SElement *parent = GetParent(); |