mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge pull request #4714 from GogoVega/fix-4712
Deleting a grouped node should update the group
This commit is contained in:
commit
ae7b9fe62e
@ -921,6 +921,17 @@ RED.editor = (function() {
|
|||||||
dirty: startDirty
|
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.nodes.dirty(true);
|
||||||
RED.view.redraw(true);
|
RED.view.redraw(true);
|
||||||
RED.history.push(historyEvent);
|
RED.history.push(historyEvent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user