From 7e9042e9f713eec981adeb8ff6af226a40efb5af Mon Sep 17 00:00:00 2001 From: wooferguy Date: Wed, 17 May 2023 05:14:18 +1200 Subject: [PATCH] Check for group Remove junction from groups node list if it is present. --- .../@node-red/editor-client/src/js/ui/view.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js index 4131f5dbf..84bf02332 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/view.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/view.js @@ -2646,6 +2646,16 @@ RED.view = (function() { var result = RED.nodes.removeJunction(node) removedJunctions.push(node); removedLinks = removedLinks.concat(result.links); + if (node.g) { + var group = RED.nodes.group(node.g); + if (selectedGroups.indexOf(group) === -1) { + // Don't use RED.group.removeFromGroup as that emits + // a change event on the node - but we're deleting it + var index = group.nodes.indexOf(node); + group.nodes.splice(index,1); + RED.group.markDirty(group); + } + } } else { if (node.direction === "out") { removedSubflowOutputs.push(node);