1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Avoid copying duplicate nodes to internal clipboard

This commit is contained in:
Nick O'Leary 2020-07-06 13:25:08 +01:00
parent 176a0ff99b
commit 73448a6039
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -2137,8 +2137,13 @@ RED.view = (function() {
var nns = [];
var nodeCount = 0;
var groupCount = 0;
var handled = {};
for (var n=0;n<nodes.length;n++) {
var node = nodes[n];
if (handled[node.id]) {
continue;
}
handled[node.id] = true;
// The only time a node.type == subflow can be selected is the
// input/output "proxy" nodes. They cannot be copied.
if (node.type != "subflow") {
@ -4874,6 +4879,9 @@ RED.view = (function() {
if (n._def.button) {
nodeButtonClicked(n);
}
},
clipboard: function() {
return clipboard
}
};
})();