diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js index 55111151c..ccecfd043 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/tab-info-outliner.js @@ -386,11 +386,20 @@ RED.sidebar.info.outliner = (function() { function onObjectRemove(n) { var existingObject = objects[n.id]; existingObject.treeList.remove(); - delete objects[n.d] + delete objects[n.id] var parent = existingObject.parent; if (parent.children.length === 0) { parent.treeList.addChild(getEmptyItem(parent.id)); } + if (existingObject.children && (existingObject.children.length > 0)) { + existingObject.children.forEach(function (nc) { + if (!nc.empty) { + var childObject = objects[nc.id]; + nc.parent = parent; + objects[parent.id].treeList.addChild(childObject); + } + }); + } } function getGutter(n) { var span = $("",{class:"red-ui-info-outline-gutter"}); 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 414bf7c17..7f541204e 100755 --- 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 @@ -1956,7 +1956,7 @@ if (DEBUG_EVENTS) { console.warn("clearSelection", mouse_mode); } removedLinks = removedLinks.concat(removedEntities.links); if (node.g) { var group = RED.nodes.group(node.g); - if (!group.selected || group.active) { + if ((!group.selected || group.active) && (selectedGroups.indexOf(group) < 0)) { RED.group.removeFromGroup(group,node); node.g = group.id; }