Commit 447f56b0 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.Navigator: Do not position items in layouts

Change-Id: I5125db79885c8a7fcec686170240d699d0d8ed5b
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent 03ac9864
......@@ -47,9 +47,15 @@ static inline void setScenePos(const QmlDesigner::ModelNode &modelNode,const QPo
{
if (modelNode.hasParentProperty() && QmlDesigner::QmlItemNode::isValidQmlItemNode(modelNode.parentProperty().parentModelNode())) {
QmlDesigner::QmlItemNode parentNode = modelNode.parentProperty().parentQmlObjectNode().toQmlItemNode();
if (!parentNode.modelNode().metaInfo().isLayoutable()) {
QPointF localPos = parentNode.instanceSceneTransform().inverted().map(pos);
modelNode.variantProperty("x").setValue(localPos.toPoint().x());
modelNode.variantProperty("y").setValue(localPos.toPoint().y());
} else { //Items in Layouts do not have a position
modelNode.removeProperty("x");
modelNode.removeProperty("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