mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
d9900d8e4c
commit
716dc781e4
@ -380,11 +380,16 @@ RED.group = (function() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
var existingGroup;
|
||||
|
||||
// Second pass, ungroup any groups in the selection and add their contents
|
||||
// to the selection
|
||||
for (var i=0; i<selection.nodes.length; i++) {
|
||||
n = selection.nodes[i];
|
||||
if (n.type === "group") {
|
||||
if (!existingGroup) {
|
||||
existingGroup = n;
|
||||
}
|
||||
ungroupHistoryEvent.groups.push(n);
|
||||
nodes = nodes.concat(ungroup(n));
|
||||
} else {
|
||||
@ -398,6 +403,10 @@ RED.group = (function() {
|
||||
// Finally, create the new group
|
||||
var group = createGroup(nodes);
|
||||
if (group) {
|
||||
if (existingGroup) {
|
||||
group.style = existingGroup.style;
|
||||
group.name = existingGroup.name;
|
||||
}
|
||||
RED.view.select({nodes:[group]})
|
||||
}
|
||||
historyEvent.events.push({
|
||||
|
Loading…
Reference in New Issue
Block a user