Commit 14959eb6 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner: paste to parent instead of selected item

parent 4baf464e
......@@ -633,6 +633,9 @@ void DesignDocumentController::paste()
if (!view.selectedModelNodes().isEmpty())
targetNode = view.selectedModelNodes().first();
if (targetNode.isValid() && targetNode.parentProperty().isValid())
targetNode = targetNode.parentProperty().parentModelNode();
if (!targetNode.isValid())
targetNode = view.rootModelNode();
......@@ -645,7 +648,6 @@ void DesignDocumentController::paste()
if (node.isAncestorOf(node2))
selectedNodes.removeAll(node2);
}
}
QList<ModelNode> pastedNodeList;
......
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