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

QmlDesigner: Update position to at node creation



Change-Id: I402d883984657668e4f7b77623f34f2bb12c402f
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent 3d1dde2b
......@@ -218,6 +218,11 @@ void NodeInstanceView::nodeCreated(const ModelNode &createdNode)
if (isSkippedNode(createdNode))
return;
QList<VariantProperty> propertyList;
propertyList.append(createdNode.variantProperty("x"));
propertyList.append(createdNode.variantProperty("y"));
updatePosition(propertyList);
nodeInstanceServer()->createInstances(createCreateInstancesCommand(QList<NodeInstance>() << instance));
nodeInstanceServer()->changePropertyValues(createChangeValueCommand(createdNode.variantProperties()));
nodeInstanceServer()->completeComponent(createComponentCompleteCommand(QList<NodeInstance>() << instance));
......
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