From 08c2c6a1e1edfec4cc36488322d6a5eafa6349fb 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 Change-Id: I9d004f66a29f5fc8646fa0e7d15673ded8eae3ec Reviewed-by: Thomas Hartmann (cherry picked from commit e0bd1e0ca903027ec046f34e29413248cc63c2a0) Reviewed-by: Qt Cherry-pick Bot --- .../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 e671c31ed3e..bf2066ae506 100644 --- a/src/tools/qmlpuppet/qmlpuppet/instances/objectnodeinstance.cpp +++ b/src/tools/qmlpuppet/qmlpuppet/instances/objectnodeinstance.cpp @@ -753,6 +753,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;