fix empty placeholder not shown on remove from group

This commit is contained in:
Hiroyasu Nishiyama 2020-06-11 09:57:43 +09:00
parent 81a4f42673
commit 842cd1ecf0
1 changed files with 6 additions and 1 deletions

View File

@ -384,8 +384,13 @@ RED.sidebar.info.outliner = (function() {
} else {
existingObject.element.find(".red-ui-info-outline-item-label").html(" ");
}
if (parent !== existingObject.parent.id) {
var oldParent = existingObject.parent;
var oldParentID = oldParent.id;
if (parent !== oldParentID) {
existingObject.treeList.remove(true);
if (oldParent.children.length === 0) {
objects[oldParentID].treeList.addChild(getEmptyItem(oldParentID));
}
if (parent === "__global__") {
globalConfigNodes.treeList.addChild(existingObject);
} else {