1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

not emit change event on group delete

This commit is contained in:
Hiroyasu Nishiyama 2020-05-25 08:46:35 +09:00
parent c5ca9fafee
commit 05f816fc5d
2 changed files with 14 additions and 10 deletions

View File

@ -362,9 +362,6 @@ RED.sidebar.info.outliner = (function() {
var existingObject = objects[n.id];
var parent = n.g||n.z;
if (!existingObject) {
return;
}
var nodeLabelText = getNodeLabelText(n);
if (nodeLabelText) {
existingObject.element.find(".red-ui-info-outline-item-label").text(nodeLabelText);
@ -373,9 +370,7 @@ RED.sidebar.info.outliner = (function() {
}
if (parent !== existingObject.parent.id) {
if (existingObject.treeList) {
existingObject.treeList.remove();
}
if (!parent) {
globalConfigNodes.treeList.addChild(existingObject);
} else {

View File

@ -1943,10 +1943,14 @@ if (DEBUG_EVENTS) { console.warn("clearSelection", mouse_mode); }
if (moving_set.length > 0) {
for (var i=0;i<moving_set.length;i++) {
var node = moving_set[i].n;
node.selected = false;
if (node.type === "group") {
selectedGroups.push(node);
} else if (node.type != "subflow") {
}
}
for (var i=0;i<moving_set.length;i++) {
var node = moving_set[i].n;
node.selected = false;
if ((node.type !== "group") && (node.type != "subflow")) {
if (node.x < 0) {
node.x = 25
}
@ -1957,10 +1961,15 @@ if (DEBUG_EVENTS) { console.warn("clearSelection", mouse_mode); }
if (node.g) {
var group = RED.nodes.group(node.g);
if (!group.selected || group.active) {
var isSelectedGroup = selectedGroups.find(function (ng) {
return (ng.id === node.g);
});
if (!isSelectedGroup) {
RED.group.removeFromGroup(group,node);
node.g = group.id;
}
}
}
} else {
if (node.direction === "out") {
removedSubflowOutputs.push(node);