Allow copy-to-clipboard copy whole tabs

This commit is contained in:
Nick O'Leary 2018-11-09 09:51:55 +01:00
parent dc880c672a
commit 1c66c88f95
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 17 additions and 3 deletions

View File

@ -1471,10 +1471,24 @@ RED.view = (function() {
}
function copySelection() {
if (moving_set.length > 0) {
var nodes = [];
var selection = RED.workspaces.selection();
if (selection.length > 0) {
nodes = [];
selection.forEach(function(n) {
if (n.type === 'tab') {
nodes.push(n);
nodes = nodes.concat(RED.nodes.filterNodes({z:n.id}));
}
});
} else if (moving_set.length > 0) {
nodes = moving_set.map(function(n) { return n.n });
}
if (nodes.length > 0) {
var nns = [];
for (var n=0;n<moving_set.length;n++) {
var node = moving_set[n].n;
for (var n=0;n<nodes.length;n++) {
var node = nodes[n];
// The only time a node.type == subflow can be selected is the
// input/output "proxy" nodes. They cannot be copied.
if (node.type != "subflow") {