diff options
author | Janne Kangas <janne.kangas@qt.io> | 2019-07-26 14:49:10 +0300 |
---|---|---|
committer | Janne Kangas <janne.kangas@qt.io> | 2019-09-23 12:03:25 +0300 |
commit | 85b766bef44ad3ce718e41163eed642bb61ddca7 (patch) | |
tree | 8c88adf09f4c8afad2b1981b789d90d4a195fec1 | |
parent | 0ab6e1fb491cbc9aa821e11a1ee78915f61ee499 (diff) |
Add debug logging for element visibilities overridden by datainput
Output log when an element visibility is overridden via datainput and is no
longer affected by slide transitions. This helps debugging visibility
issues with presentations that use both datainput and slide initial values
to control element visibility.
Change-Id: I56fc39ff80851a16b0b2a90ca9d4c687d71750a3
Task-id: QT3DS-3951
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/runtime/Qt3DSActivationManager.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/runtime/Qt3DSActivationManager.cpp b/src/runtime/Qt3DSActivationManager.cpp index 7015a61..9b74ea5 100644 --- a/src/runtime/Qt3DSActivationManager.cpp +++ b/src/runtime/Qt3DSActivationManager.cpp @@ -497,7 +497,12 @@ struct STimeContext void setControlled(TActivityItem &item) { - m_ControlledList.insert(item); + if (!m_ControlledList.contains(item)) { + m_ControlledList.insert(item); + qCInfo(TRACE_INFO) << "Element" << item.m_Name.c_str() + << "visibility now controlled by datainput. " + "Visibility will no longer be affected by slide transitions."; + } } static void UpdateItemScriptStatus(SElement &inNode, bool activeAndHasScript, @@ -573,9 +578,12 @@ struct STimeContext bool parentActive = theEntry.IsParentActive(); bool wasActive = theScanNode->IsGlobalActive(); + bool isControlledByDi + = controlledList.contains(*theScanNode) && theScanNode->m_OnMaster; + // Override visibility for master slide elements that have datainput eyeball controller. - bool isActive = (controlledList.contains(*theScanNode) && theScanNode->m_OnMaster) - ? theScanNode->IsControlledActive() : theScanNode->IsGlobalActive(parentActive); + bool isActive = isControlledByDi ? theScanNode->IsControlledActive() + : theScanNode->IsGlobalActive(parentActive); bool wasChildDirty = theScanNode->m_ActivationManagerNode.m_Flags.IsChildDirty(); theScanNode->m_ActivationManagerNode.m_Flags.ClearChildDirty(); bool activateChange = isActive != wasActive; @@ -583,6 +591,9 @@ struct STimeContext if (activateChange) { HandleActivationChange(*theScanNode, activateBuffer, deactivateBuffer, scriptBuffer, inElementAccessMutex, scriptBufferRequiresSort, isActive); + } else if (isControlledByDi) { + qCInfo(TRACE_INFO) << "Element" << theScanNode->m_Name.c_str() + << "visibility persistently controlled by datainput."; } if (checkChildren && theScanNode->m_Child) { @@ -590,7 +601,11 @@ struct STimeContext theScanNodeChild = theScanNodeChild->m_Sibling) { // Override visibility for master slide elements that have datainput // eyeball controller. - if (controlledList.contains(*theScanNodeChild) && theScanNodeChild->m_OnMaster) + isControlledByDi + = controlledList.contains(*theScanNodeChild) + && theScanNodeChild->m_OnMaster; + + if (isControlledByDi) theScanNodeChild->SetExplicitActive(theScanNodeChild->IsControlledActive()); if (theScanNodeChild->IsIndependent() == false) inScanBuffer.push_back(SScanBufferEntry(theScanNodeChild, isActive)); |