Commit f286f210 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Don't change x or y if vertical anchors are set

Task-number: QTCREATORBUG-11783
Change-Id: I81f64afc3308e2e1b66dea5540704767d30e29d2
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 819413fc
...@@ -605,10 +605,14 @@ bool QmlItemNode::hasAnySubModelNodes() const ...@@ -605,10 +605,14 @@ bool QmlItemNode::hasAnySubModelNodes() const
void QmlItemNode::setPosition(const QPointF &position) void QmlItemNode::setPosition(const QPointF &position)
{ {
if (!hasBindingProperty("x") && !anchors().instanceHasAnchor(AnchorLine::Left)) if (!hasBindingProperty("x")
&& !anchors().instanceHasAnchor(AnchorLine::Left)
&& !anchors().instanceHasAnchor(AnchorLine::HorizontalCenter))
setVariantProperty("x", qRound(position.x())); setVariantProperty("x", qRound(position.x()));
if (!hasBindingProperty("y") && !anchors().instanceHasAnchor(AnchorLine::Top)) if (!hasBindingProperty("y")
&& !anchors().instanceHasAnchor(AnchorLine::Top)
&& !anchors().instanceHasAnchor(AnchorLine::VerticalCenter))
setVariantProperty("y", qRound(position.y())); setVariantProperty("y", qRound(position.y()));
} }
......
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