mirror of https://github.com/node-red/node-red.git
Merge pull request #4714 from GogoVega/fix-4712
Deleting a grouped node should update the grouppull/4716/head
commit
ae7b9fe62e
|
@ -921,6 +921,17 @@ RED.editor = (function() {
|
|||
dirty: startDirty
|
||||
}
|
||||
|
||||
if (editing_node.g) {
|
||||
const group = RED.nodes.group(editing_node.g);
|
||||
// Don't use RED.group.removeFromGroup as that emits
|
||||
// a change event on the node - but we're deleting it
|
||||
const index = group?.nodes.indexOf(editing_node) ?? -1;
|
||||
if (index > -1) {
|
||||
group.nodes.splice(index, 1);
|
||||
RED.group.markDirty(group);
|
||||
}
|
||||
}
|
||||
|
||||
RED.nodes.dirty(true);
|
||||
RED.view.redraw(true);
|
||||
RED.history.push(historyEvent);
|
||||
|
|
Loading…
Reference in New Issue