summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/runtime/Qt3DSQmlElementHelper.cpp3
-rw-r--r--src/runtime/Qt3DSQmlEngine.cpp18
2 files changed, 12 insertions, 9 deletions
diff --git a/src/runtime/Qt3DSQmlElementHelper.cpp b/src/runtime/Qt3DSQmlElementHelper.cpp
index fdc67ad..1ddd1c8 100644
--- a/src/runtime/Qt3DSQmlElementHelper.cpp
+++ b/src/runtime/Qt3DSQmlElementHelper.cpp
@@ -254,7 +254,8 @@ bool CQmlElementHelper::SetAttribute(TElement *theElement, const char *theAttNam
bool force = false;
// Fail if trying to change the activation state of an object in another slide
- if (theAttributeKey.m_Hash == Q3DStudio::ATTRIBUTE_EYEBALL) {
+ if (theAttributeKey.m_Hash == Q3DStudio::ATTRIBUTE_EYEBALL
+ && theElement->GetBelongedPresentation()->GetActivityZone()) {
CPresentation *presentation = static_cast<CPresentation *>(
theElement->GetBelongedPresentation());
ISlideSystem &slideSystem = presentation->GetSlideSystem();
diff --git a/src/runtime/Qt3DSQmlEngine.cpp b/src/runtime/Qt3DSQmlEngine.cpp
index c7e6e88..e5378a6 100644
--- a/src/runtime/Qt3DSQmlEngine.cpp
+++ b/src/runtime/Qt3DSQmlEngine.cpp
@@ -608,14 +608,16 @@ void CQmlEngineImpl::Initialize()
bool queueAttributeChange(TElement *target, const char *attName, const char *value)
{
- TElement *componentElement = target->GetActivityZone().GetItemTimeParent(*target);
- TComponent *component = static_cast<TComponent *>(componentElement);
- // Queue changes to elements inside components that have not been activated even once
- if (component->GetCurrentSlide() == 0) {
- IPresentation *presentation = target->GetBelongedPresentation();
- presentation->GetComponentManager().queueChange(componentElement, target,
- attName, value);
- return true;
+ if (target->m_BelongedPresentation->GetActivityZone()) {
+ TElement *componentElement = target->GetActivityZone().GetItemTimeParent(*target);
+ TComponent *component = static_cast<TComponent *>(componentElement);
+ // Queue changes to elements inside components that have not been activated even once
+ if (component->GetCurrentSlide() == 0) {
+ IPresentation *presentation = target->GetBelongedPresentation();
+ presentation->GetComponentManager().queueChange(componentElement, target,
+ attName, value);
+ return true;
+ }
}
return false;
}