summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Leinonen <tony.leinonen@qt.io>2021-01-21 12:01:04 +0200
committerTony Leinonen <tony.leinonen@qt.io>2021-01-26 13:43:21 +0000
commit5d101606b19df9582cf100aa2139932caff83f98 (patch)
treea9d34dce8c6959ec8f2760e58acfa6d9b27b173d
parent930aa56b2fe91012509d284b3453552579659792 (diff)
Add case for datainput between slide changes
When a slide and objects properties are changed in the same frame the property changes are not getting applied. Task-number: QT3DS-4214 Change-Id: Iaa0a71939b1f2f8506642208735edcd02807f09b Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
-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)