Commit ecefef03 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.navigator: better support for positioners

The properties x and y get removed when putting an item
into an positioner.
parent 61ae2adc
......@@ -529,7 +529,16 @@ void NavigatorTreeModel::moveNodesInteractive(NodeAbstractProperty parentPropert
}
}
parentProperty.reparentHere(node);
if (parentProperty.isDefaultProperty() && parentProperty.parentModelNode().metaInfo().isSubclassOf("QtQuick.QDeclarativeBasePositioner", -1, -1)) {
ModelNode currentNode = node;
if (currentNode.hasProperty("x"))
currentNode.removeProperty("x");
if (currentNode.hasProperty("y"))
currentNode.removeProperty("y");
parentProperty.reparentHere(currentNode);
} else {
parentProperty.reparentHere(node);
}
}
if (parentProperty.isNodeListProperty()) {
......
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