Commit 71dde2cb authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.instances: fix NodeInstance::parent()

We now take into account that parents have
to be skipped until we get to the parent that
has a node instance
parent 649012a2
......@@ -70,8 +70,17 @@ QSizeF GraphicsObjectNodeInstance::size() const
QTransform GraphicsObjectNodeInstance::transform() const
if (graphicsObject()->parentItem())
return graphicsObject()->itemTransform(graphicsObject()->parentItem());
if (!nodeInstanceView()->hasInstanceForNode(modelNode()))
return sceneTransform();
NodeInstance nodeInstanceParent = nodeInstanceView()->instanceForNode(modelNode()).parent();
if (!nodeInstanceParent.isValid())
return sceneTransform();
QGraphicsObject *graphicsObjectParent = qobject_cast<QGraphicsObject*>(nodeInstanceParent.internalObject());
if (graphicsObjectParent)
return graphicsObject()->itemTransform(graphicsObjectParent);
return sceneTransform();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment