From 4c98db226997cc5c254dd6c6721aa815fe71f202 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 24 Jun 2020 13:18:46 +0100 Subject: [PATCH] Outliner - add empty item when last config node moved --- .../@node-red/editor-client/src/js/ui/tab-info-outliner.js | 7 +++++++ 1 file changed, 7 insertions(+) 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 d33c3aabe..ca4baa586 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 @@ -427,6 +427,10 @@ RED.sidebar.info.outliner = (function() { } else { delete configNodeTypes[parentItem.parent.parent.id]; parentItem.parent.treeList.remove(); + if (parentItem.parent.parent.children.length === 0) { + parentItem.parent.parent.treeList.addChild(getEmptyItem(parentItem.parent.parent.id)); + } + } } } else { @@ -494,6 +498,9 @@ RED.sidebar.info.outliner = (function() { } else { delete configNodeTypes[n.z]; parent.parent.treeList.remove(); + if (parent.parent.parent.children.length === 0) { + parent.parent.parent.treeList.addChild(getEmptyItem(parent.parent.parent.id)); + } } } } else {