Commit 04f29127 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Fix transformation bug for tab widgets

Change-Id: Idc33ddf04f0b6fc317aeb5ed72fd7164ba174ab4
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent aa4e4e38
......@@ -79,8 +79,10 @@ static QTransform transformForItem(QQuickItem *item, NodeInstanceServer *nodeIns
}
QTransform QuickItemNodeInstance::transform() const
{
return transformForItem(quickItem(), nodeInstanceServer());
{ if (quickItem()->parentItem())
return DesignerSupport::parentTransform(quickItem());;
return QTransform();
}
......@@ -146,9 +148,23 @@ QRectF QuickItemNodeInstance::contentItemBoundingBox() const
return QRectF();
}
static QTransform contentItemTransformForItem(QQuickItem *item, NodeInstanceServer *nodeInstanceServer)
{
QTransform toParentTransform = DesignerSupport::parentTransform(item);
if (item->parentItem() && !nodeInstanceServer->hasInstanceForObject(item->parentItem())) {
return transformForItem(item->parentItem(), nodeInstanceServer) * toParentTransform;
}
return toParentTransform;
}
QTransform QuickItemNodeInstance::contentItemTransform() const
{
return DesignerSupport::parentTransform(contentItem());
if (contentItem())
return contentItemTransformForItem(contentItem(), nodeInstanceServer());
return QTransform();
}
......
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