forked from qt-creator/qt-creator
QmlDesigner: Reset puppet if shader property changes
Puppet reset is needed as changing shader makes no difference if done after material initialization. Change-Id: I67b0b4cca28b4636cc9acb1cd7446dfabc10e2ee Fixes: QDS-3300 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -465,6 +465,8 @@ void NodeInstanceView::propertiesAboutToBeRemoved(const QList<AbstractProperty>&
|
|||||||
resetVerticalAnchors(property.parentModelNode());
|
resetVerticalAnchors(property.parentModelNode());
|
||||||
} else if (name == "anchors.baseline") {
|
} else if (name == "anchors.baseline") {
|
||||||
resetVerticalAnchors(property.parentModelNode());
|
resetVerticalAnchors(property.parentModelNode());
|
||||||
|
} else if (name == "shader" && property.parentModelNode().isSubclassOf("QtQuick3D.Shader")) {
|
||||||
|
m_resetTimer.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -513,6 +515,13 @@ void NodeInstanceView::variantPropertiesChanged(const QList<VariantProperty>& pr
|
|||||||
QTC_ASSERT(m_nodeInstanceServer, return);
|
QTC_ASSERT(m_nodeInstanceServer, return);
|
||||||
updatePosition(propertyList);
|
updatePosition(propertyList);
|
||||||
m_nodeInstanceServer->changePropertyValues(createChangeValueCommand(propertyList));
|
m_nodeInstanceServer->changePropertyValues(createChangeValueCommand(propertyList));
|
||||||
|
|
||||||
|
for (const auto &property : propertyList) {
|
||||||
|
if (property.name() == "shader" && property.parentModelNode().isSubclassOf("QtQuick3D.Shader")) {
|
||||||
|
m_resetTimer.start();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*!
|
/*!
|
||||||
Notifies the view that the property parent of the model node \a node has
|
Notifies the view that the property parent of the model node \a node has
|
||||||
|
|||||||
Reference in New Issue
Block a user