Commit fe62ad28 authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Don't change x, y, width and height if anchored



Task-number: QTCREATORBUG-10093
Change-Id: Ice5dab344299842797c82f63540ed62048ca3627
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 73510473
...@@ -595,10 +595,10 @@ bool QmlItemNode::hasAnySubModelNodes() const ...@@ -595,10 +595,10 @@ bool QmlItemNode::hasAnySubModelNodes() const
void QmlItemNode::setPosition(const QPointF &position) void QmlItemNode::setPosition(const QPointF &position)
{ {
if (!hasBindingProperty("x")) if (!hasBindingProperty("x") && !anchors().instanceHasAnchor(AnchorLine::Left))
setVariantProperty("x", qRound(position.x())); setVariantProperty("x", qRound(position.x()));
if (!hasBindingProperty("y")) if (!hasBindingProperty("y") && !anchors().instanceHasAnchor(AnchorLine::Top))
setVariantProperty("y", qRound(position.y())); setVariantProperty("y", qRound(position.y()));
} }
...@@ -610,10 +610,10 @@ void QmlItemNode::setPostionInBaseState(const QPointF &position) ...@@ -610,10 +610,10 @@ void QmlItemNode::setPostionInBaseState(const QPointF &position)
void QmlItemNode::setSize(const QSizeF &size) void QmlItemNode::setSize(const QSizeF &size)
{ {
if (!hasBindingProperty("width")) if (!hasBindingProperty("width") && !anchors().instanceHasAnchor(AnchorLine::Right))
setVariantProperty("width", qRound(size.width())); setVariantProperty("width", qRound(size.width()));
if (!hasBindingProperty("height")) if (!hasBindingProperty("height") && !anchors().instanceHasAnchor(AnchorLine::Bottom))
setVariantProperty("height", qRound(size.height())); setVariantProperty("height", qRound(size.height()));
} }
......
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