summaryrefslogtreecommitdiffstats
path: root/src/runtime/Qt3DSQmlEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/Qt3DSQmlEngine.cpp')
-rw-r--r--src/runtime/Qt3DSQmlEngine.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/runtime/Qt3DSQmlEngine.cpp b/src/runtime/Qt3DSQmlEngine.cpp
index 3ef4b11..0bfddba 100644
--- a/src/runtime/Qt3DSQmlEngine.cpp
+++ b/src/runtime/Qt3DSQmlEngine.cpp
@@ -921,10 +921,21 @@ void CQmlEngineImpl::SetDataInputValue(
<< diDef.type;
break;
}
-
SetAttribute(ctrlElem.elementPath.constData(),
ctrlElem.attributeName.first().constData(),
reinterpret_cast<const char *>(&valueBool));
+
+ // Special case for eyeball (visibility) controller that targets elements
+ // on master slide, and whose visibility setting must be persistent over
+ // slide changes.
+ TElement *element = getTarget(ctrlElem.elementPath.constData());
+ auto hash = CHash::HashAttribute(ctrlElem.attributeName.first().constData());
+
+ if (hash == Q3DStudio::ATTRIBUTE_EYEBALL && element->m_OnMaster) {
+ element->GetActivityZone().setControlled(*element);
+ element->SetControlledActive(valueBool);
+ }
+
break;
}
case ATTRIBUTETYPE_STRING: {