From e0bd1e0ca903027ec046f34e29413248cc63c2a0 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Thu, 15 May 2025 14:10:25 +0200 Subject: [PATCH] QmlDesigner: Fix shape rendering in 2D view Fix shape rendering in 2D view by calling classBegin() when creating object node instances. This will set the completed flag in QQuickPath to false. Otherwise it will be true which will lead to adding path elements twice to the internal _pathCurves member due to QtDS calling onCompleted manually at a later step. Task-number: QDS-14846 Pick-to: qds/4.7 Change-Id: I9d004f66a29f5fc8646fa0e7d15673ded8eae3ec Reviewed-by: Thomas Hartmann --- .../qmlpuppet/qmlpuppet/instances/objectnodeinstance.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tools/qmlpuppet/qmlpuppet/instances/objectnodeinstance.cpp b/src/tools/qmlpuppet/qmlpuppet/instances/objectnodeinstance.cpp index 9dc8b7e6611..accaf38f2de 100644 --- a/src/tools/qmlpuppet/qmlpuppet/instances/objectnodeinstance.cpp +++ b/src/tools/qmlpuppet/qmlpuppet/instances/objectnodeinstance.cpp @@ -763,6 +763,10 @@ ObjectNodeInstance::Pointer ObjectNodeInstance::create(QObject *object) { Pointer instance(new ObjectNodeInstance(object)); + QQmlParserStatus *qmlParserStatus = dynamic_cast(object); + if (qmlParserStatus) + qmlParserStatus->classBegin(); + instance->populateResetHashes(); return instance;