diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2020-02-12 14:56:08 +0100 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2020-02-14 15:03:26 +0000 |
commit | 95953f949af748e79fe14e711b5529bae4446d3f (patch) | |
tree | 59b74de7550b3cd200f1092db1aec4366900d8ae | |
parent | e40014cb3ac4f37ce222380cac161953cfc4c6ea (diff) | |
download | qt-creator-95953f949af748e79fe14e711b5529bae4446d3f.tar.gz |
QmlDesigner: Only scatter item if they have positions
Task-number: QDS-1642
Change-Id: I0e99cfc9027e283d3dc6ce239a74c48bfc092e99
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r-- | src/plugins/qmldesigner/components/integration/designdocument.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/integration/designdocument.cpp b/src/plugins/qmldesigner/components/integration/designdocument.cpp index 5adc18347c..9d3809727e 100644 --- a/src/plugins/qmldesigner/components/integration/designdocument.cpp +++ b/src/plugins/qmldesigner/components/integration/designdocument.cpp @@ -394,6 +394,9 @@ static void scatterItem(const ModelNode &pastedNode, const ModelNode &targetNode if (targetNode.metaInfo().isValid() && targetNode.metaInfo().isLayoutable()) return; + if (!(pastedNode.hasVariantProperty("x") && pastedNode.hasVariantProperty("y"))) + return; + bool scatter = false; foreach (const ModelNode &childNode, targetNode.directSubModelNodes()) { if ((childNode.variantProperty("x").value() == pastedNode.variantProperty("x").value()) && |