Commit 1fd1bf98 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.PropertyEditor: use proper transforms for anchors

Change-Id: I71866481b6d7e9ae42d5f9c90e6006fde5767511
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 26b51c7a
......@@ -418,8 +418,11 @@ void QmlAnchorBindingProxy::setRightAnchor(bool anchor)
}
QRectF QmlAnchorBindingProxy::parentBoundingBox()
{
if (m_fxItemNode.hasInstanceParent())
if (m_fxItemNode.hasInstanceParent()) {
if (m_fxItemNode.instanceParent().toQmlItemNode().instanceContentItemBoundingRect().isValid())
return m_fxItemNode.instanceParent().toQmlItemNode().instanceContentItemBoundingRect();
return m_fxItemNode.instanceParent().toQmlItemNode().instanceBoundingRect();
}
return QRect();
}
......@@ -434,7 +437,7 @@ QRectF QmlAnchorBindingProxy::boundingBox(QmlItemNode node)
QRectF QmlAnchorBindingProxy::transformedBoundingBox()
{
return m_fxItemNode.instanceTransform().mapRect(m_fxItemNode.instanceBoundingRect());
return m_fxItemNode.instanceTransformWithContentTransform().mapRect(m_fxItemNode.instanceBoundingRect());
}
void QmlAnchorBindingProxy::calcTopMargin()
......
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