From f6fdcfef536c1d4e6333cd30ddb6eebf122b5fe3 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 30 May 2022 14:52:41 +0300 Subject: [PATCH] QmlDesigner: Remove a couple of work around puppet resets The issues that were worked around by these resets have been fixed. Fixes: QDS-7009 Change-Id: I7940b55c3f3edcfdcde9ad5f41cfa1d188d2bc96 Reviewed-by: Samuel Ghinet Reviewed-by: Mahmoud Badri --- .../designercore/instances/nodeinstanceview.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp index 2b490f5f96f..99c6b6f79cc 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp @@ -599,11 +599,9 @@ void NodeInstanceView::nodeReparented(const ModelNode &node, const NodeAbstractP // Reset puppet when particle emitter/affector is reparented to work around issue in // autodetecting the particle system it belongs to. QTBUG-101157 - // Reset is also needed when particle shapes are reparented. QTBUG-101882 - if (((node.isSubclassOf("QtQuick.Particles3D.ParticleEmitter3D") + if ((node.isSubclassOf("QtQuick.Particles3D.ParticleEmitter3D") || node.isSubclassOf("QtQuick.Particles3D.Affector3D")) - && node.property("system").toBindingProperty().expression().isEmpty()) - || node.isSubclassOf("QQuick3DParticleAbstractShape")) { + && node.property("system").toBindingProperty().expression().isEmpty()) { resetPuppet(); } } @@ -2179,9 +2177,8 @@ void NodeInstanceView::maybeResetOnPropertyChange(const PropertyName &name, cons { bool reset = false; if (flags & AbstractView::PropertiesAdded - && name == "model" && (node.isSubclassOf("QtQuick.Repeater") - || node.isSubclassOf("QtQuick3D.Repeater3D"))) { - // TODO: This is a workaround for QTBUG-97583 (2D) and QTBUG-97586 (3D): + && name == "model" && node.isSubclassOf("QtQuick.Repeater")) { + // TODO: This is a workaround for QTBUG-97583: // Reset puppet when repeater model is first added, if there is already a delegate if (node.hasProperty("delegate")) reset = true;