summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/runtime/Qt3DSComponentManager.cpp12
-rw-r--r--src/runtime/Qt3DSElementSystem.h11
2 files changed, 15 insertions, 8 deletions
diff --git a/src/runtime/Qt3DSComponentManager.cpp b/src/runtime/Qt3DSComponentManager.cpp
index 73c3467..27d75e1 100644
--- a/src/runtime/Qt3DSComponentManager.cpp
+++ b/src/runtime/Qt3DSComponentManager.cpp
@@ -85,10 +85,14 @@ void CComponentManager::GotoSlideIndex(TElement *inComponent,
return;
}
- if (!theComponent->GetActive() || theComponent->AboutToDeactivate()) {
- // When (becoming) not active, don't proceed slide switching
- m_ComponentInitialSlideMap[inComponent] = inGotoData;
- return;
+ if (theComponent->GetActive()) {
+ if (!theComponent->IsAnyParentAboutToActivate()) {
+ if (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 6eb95a9..22cf66c 100644
--- a/src/runtime/Qt3DSElementSystem.h
+++ b/src/runtime/Qt3DSElementSystem.h
@@ -480,11 +480,14 @@ namespace runtime {
bool IsAnyParentAboutToActivate()
{
SElement *parent = GetParent();
- bool isActivating = parent->AboutToActivate();
- if (Depth() > 2 && !isActivating)
- isActivating = parent->IsAnyParentAboutToActivate();
+ if (parent) {
+ bool isActivating = parent->AboutToActivate();
+ if (Depth() > 2 && !isActivating)
+ isActivating = parent->IsAnyParentAboutToActivate();
- return isActivating;
+ return isActivating;
+ }
+ return false;
}
void SetPickEnabled(bool inValue)