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:
parent
176a0ff99b
commit
73448a6039
@ -2137,8 +2137,13 @@ RED.view = (function() {
|
|||||||
var nns = [];
|
var nns = [];
|
||||||
var nodeCount = 0;
|
var nodeCount = 0;
|
||||||
var groupCount = 0;
|
var groupCount = 0;
|
||||||
|
var handled = {};
|
||||||
for (var n=0;n<nodes.length;n++) {
|
for (var n=0;n<nodes.length;n++) {
|
||||||
var node = nodes[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
|
// The only time a node.type == subflow can be selected is the
|
||||||
// input/output "proxy" nodes. They cannot be copied.
|
// input/output "proxy" nodes. They cannot be copied.
|
||||||
if (node.type != "subflow") {
|
if (node.type != "subflow") {
|
||||||
@ -4874,6 +4879,9 @@ RED.view = (function() {
|
|||||||
if (n._def.button) {
|
if (n._def.button) {
|
||||||
nodeButtonClicked(n);
|
nodeButtonClicked(n);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
clipboard: function() {
|
||||||
|
return clipboard
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user