summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2021-04-07 19:25:58 +0300
committerAntti Määttä <antti.maatta@qt.io>2021-04-08 09:32:54 +0300
commitda294d646d7f31855822b06f18ff5b061237eaa2 (patch)
treebbc9df0092e03b408f06d8cb5b709f24f9a028e9
parentf9835763becd76e9423396c8c2c793fe99aa3877 (diff)
Fix activation for datainput controlled components
Remove the check for parent activation from the GotoSlideIndex activation check. The component activation check can only be passed if the component is actually active since that activates all it's children. Any parent being activated doesn't mean that the component should be activated. Add proper fix for QT3DS-4214 by checking if the component is datainput controlled active. The AboutToDeactivate checks if the component is dirty(implies activity change) and not explicitly active and returns true for data input controlled components even if it is active by data inputs. Task-number: QT3DS-4227 Change-Id: I9fcd4f947ba137d7c0e856da15a3d8480ed07c0e Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r--src/runtime/Qt3DSComponentManager.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/runtime/Qt3DSComponentManager.cpp b/src/runtime/Qt3DSComponentManager.cpp
index f20176b..2665c4a 100644
--- a/src/runtime/Qt3DSComponentManager.cpp
+++ b/src/runtime/Qt3DSComponentManager.cpp
@@ -85,12 +85,12 @@ void CComponentManager::GotoSlideIndex(TElement *inComponent,
return;
}
- if (!theComponent->IsAnyParentAboutToActivate()) {
- if (!theComponent->GetActive() || theComponent->AboutToDeactivate()) {
- // When (becoming) not active, don't proceed slide switching
- m_ComponentInitialSlideMap[inComponent] = inGotoData;
- return;
- }
+ // This check prevents slide changes to inactive components from activating the component children.
+ // Slide switch can proceed only if the component is actually active.
+ if (!theComponent->GetActive() || (theComponent->AboutToDeactivate()
+ && !theComponent->IsControlledActive())) {
+ m_ComponentInitialSlideMap[inComponent] = inGotoData;
+ return;
}
SComponentGotoSlideData theGotoSlideData(inGotoData);