QmlDesigner: Do not scatter pasted nodes anymore

Scattering/moving pasted nodes does more harm than good.

Task-number: QDS-10972
Change-Id: I625cf228fb688c48715152eb6471728ca7202a23
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2023-12-20 15:59:44 +01:00
parent e436bf47fe
commit 8738057967

View File

@@ -270,9 +270,6 @@ void DesignDocument::moveNodesToPosition(const QList<ModelNode> &nodes, const st
NodeListProperty parentProperty = targetNode.nodeListProperty(defaultPropertyName);
QList<ModelNode> pastedNodeList;
const double scatterRange = 20.;
int offset = QRandomGenerator::global()->generateDouble() * scatterRange - scatterRange / 2;
std::optional<QmlVisualNode> firstVisualNode;
QVector3D translationVect;
for (const ModelNode &node : std::as_const(movingNodes)) {
@@ -288,7 +285,6 @@ void DesignDocument::moveNodesToPosition(const QList<ModelNode> &nodes, const st
: QVector3D();
}
visualNode.translate(translationVect);
visualNode.scatter(targetNode, offset);
}
view.setSelectedModelNodes(pastedNodeList);