diff options
-rw-r--r-- | src/runtime/Qt3DSElementSystem.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/runtime/Qt3DSElementSystem.cpp b/src/runtime/Qt3DSElementSystem.cpp index f87f4fd..836b65b 100644 --- a/src/runtime/Qt3DSElementSystem.cpp +++ b/src/runtime/Qt3DSElementSystem.cpp @@ -770,10 +770,19 @@ void SElement::SetFlag(Q3DStudio::EElementFlag inFlag, bool inValue) bool existing = m_Flags & inFlag; if (existing != inValue && HasActivityZone()) { m_Flags.clearOrSet(inValue, inFlag); - if (inFlag == Q3DStudio::ELEMENTFLAG_EXPLICITACTIVE) + if (inFlag == Q3DStudio::ELEMENTFLAG_EXPLICITACTIVE) { GetActivityZone().UpdateItemInfo(*this); - else if (inFlag == Q3DStudio::ELEMENTFLAG_SCRIPTCALLBACKS) + if (IsComponent()) { + SElement *parent = m_Parent; + // Get out parent component + while (parent && parent->m_Parent && !parent->IsComponent()) + parent = parent->m_Parent; + if (parent) + parent->GetActivityZone().UpdateItemInfo(*parent); + } + } else if (inFlag == Q3DStudio::ELEMENTFLAG_SCRIPTCALLBACKS) { GetActivityZone().UpdateItemScriptStatus(*this); + } SetDirty(); } } |