From 334135680ce1516551d4f10e387cc291f275f30a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Fri, 18 May 2018 09:56:11 +0200 Subject: Store the master rollback list directly in the node Simplefies usage and we're not saving much from allocating it on demand anyways. Change-Id: I14a8921932c7b4ee26f5b2d05588fecfbc1d84b6 Reviewed-by: Laszlo Agocs --- src/runtime/q3dsuippresentation.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/runtime/q3dsuippresentation.cpp') diff --git a/src/runtime/q3dsuippresentation.cpp b/src/runtime/q3dsuippresentation.cpp index 3633a2a..3d2e4c7 100644 --- a/src/runtime/q3dsuippresentation.cpp +++ b/src/runtime/q3dsuippresentation.cpp @@ -2532,9 +2532,7 @@ void Q3DSNode::setProperties(const QXmlStreamAttributes &attrs, PropSetFlags fla // If this is on the master slide, store some rollback info. if (flags.testFlag(PropSetOnMaster)) { - if (m_masterRollbackList.isNull()) - m_masterRollbackList.reset(new Q3DSPropertyChangeList); - m_masterRollbackList->append(Q3DSPropertyChange(QLatin1String("eyeball"), + m_masterRollbackList.append(Q3DSPropertyChange(QLatin1String("eyeball"), m_flags.testFlag(Q3DSNode::Active) ? QLatin1String("True") : QLatin1String("False"))); -- cgit v1.2.3 From b7e63b82396abfb25e1c31443ed6c7f9437aa30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Wed, 23 May 2018 15:32:37 +0200 Subject: Fix eyeball updates for effects We need to update these the same way we do node types, which includes storing the rollback data to reset the values once the slide changes. Change-Id: I2f59a68d279d00c331ca63f29885c1b0552008a9 Reviewed-by: Laszlo Agocs --- src/runtime/q3dsuippresentation.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/runtime/q3dsuippresentation.cpp') diff --git a/src/runtime/q3dsuippresentation.cpp b/src/runtime/q3dsuippresentation.cpp index 3d2e4c7..75bef24 100644 --- a/src/runtime/q3dsuippresentation.cpp +++ b/src/runtime/q3dsuippresentation.cpp @@ -2323,6 +2323,13 @@ void Q3DSEffectInstance::setProperties(const QXmlStreamAttributes &attrs, PropSe // refer to custom properties defined in the effect. for (const QXmlStreamAttribute &attr : attrs) m_pendingCustomProperties.append(Q3DSPropertyChange(attr.name().toString(), attr.value().toString())); + + // If this is on the master slide, store some rollback info. + if (flags.testFlag(PropSetOnMaster)) { + m_masterRollbackList.append(Q3DSPropertyChange(QLatin1String("eyeball"), m_active ? QLatin1String("True") + : QLatin1String("False"))); + + } } void Q3DSEffectInstance::applyPropertyChanges(const Q3DSPropertyChangeList &changeList) -- cgit v1.2.3