forked from qt-creator/qt-creator
QmlDesigner: Reset puppet when ParticleShape3D is reparented
This is a workaround to QtQuick3D bug that only updates the parent node of the shape at componentComplete. Fixes: QDS-6473 Change-Id: Ice8afdc81b35eb40c07889bb1eebcdb70e68c17d Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -565,9 +565,11 @@ void NodeInstanceView::nodeReparented(const ModelNode &node, const NodeAbstractP
|
|||||||
|
|
||||||
// Reset puppet when particle emitter/affector is reparented to work around issue in
|
// Reset puppet when particle emitter/affector is reparented to work around issue in
|
||||||
// autodetecting the particle system it belongs to. QTBUG-101157
|
// autodetecting the particle system it belongs to. QTBUG-101157
|
||||||
if ((node.isSubclassOf("QtQuick.Particles3D.ParticleEmitter3D")
|
// Reset is also needed when particle shapes are reparented. QTBUG-101882
|
||||||
|| node.isSubclassOf("QtQuick.Particles3D.Affector3D"))
|
if (((node.isSubclassOf("QtQuick.Particles3D.ParticleEmitter3D")
|
||||||
&& node.property("system").toBindingProperty().expression().isEmpty()) {
|
|| node.isSubclassOf("QtQuick.Particles3D.Affector3D"))
|
||||||
|
&& node.property("system").toBindingProperty().expression().isEmpty())
|
||||||
|
|| node.isSubclassOf("QQuick3DParticleAbstractShape")) {
|
||||||
resetPuppet();
|
resetPuppet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user