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 <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2025-05-15 14:10:25 +02:00
committed by Henning Gründl
parent 30db773402
commit e0bd1e0ca9

View File

@@ -763,6 +763,10 @@ ObjectNodeInstance::Pointer ObjectNodeInstance::create(QObject *object)
{ {
Pointer instance(new ObjectNodeInstance(object)); Pointer instance(new ObjectNodeInstance(object));
QQmlParserStatus *qmlParserStatus = dynamic_cast<QQmlParserStatus *>(object);
if (qmlParserStatus)
qmlParserStatus->classBegin();
instance->populateResetHashes(); instance->populateResetHashes();
return instance; return instance;