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 <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2022-05-30 14:52:41 +03:00
parent 80ea026fd8
commit f6fdcfef53

View File

@@ -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 // 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
// 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.isSubclassOf("QtQuick.Particles3D.Affector3D"))
&& node.property("system").toBindingProperty().expression().isEmpty()) && node.property("system").toBindingProperty().expression().isEmpty()) {
|| node.isSubclassOf("QQuick3DParticleAbstractShape")) {
resetPuppet(); resetPuppet();
} }
} }
@@ -2179,9 +2177,8 @@ void NodeInstanceView::maybeResetOnPropertyChange(const PropertyName &name, cons
{ {
bool reset = false; bool reset = false;
if (flags & AbstractView::PropertiesAdded if (flags & AbstractView::PropertiesAdded
&& name == "model" && (node.isSubclassOf("QtQuick.Repeater") && name == "model" && node.isSubclassOf("QtQuick.Repeater")) {
|| node.isSubclassOf("QtQuick3D.Repeater3D"))) { // TODO: This is a workaround for QTBUG-97583:
// TODO: This is a workaround for QTBUG-97583 (2D) and QTBUG-97586 (3D):
// Reset puppet when repeater model is first added, if there is already a delegate // Reset puppet when repeater model is first added, if there is already a delegate
if (node.hasProperty("delegate")) if (node.hasProperty("delegate"))
reset = true; reset = true;