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:
parent
c5ca9fafee
commit
05f816fc5d
@ -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();
|
||||
}
|
||||
existingObject.treeList.remove();
|
||||
if (!parent) {
|
||||
globalConfigNodes.treeList.addChild(existingObject);
|
||||
} else {
|
||||
|
@ -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,8 +1961,13 @@ if (DEBUG_EVENTS) { console.warn("clearSelection", mouse_mode); }
|
||||
if (node.g) {
|
||||
var group = RED.nodes.group(node.g);
|
||||
if (!group.selected || group.active) {
|
||||
RED.group.removeFromGroup(group,node);
|
||||
node.g = group.id;
|
||||
var isSelectedGroup = selectedGroups.find(function (ng) {
|
||||
return (ng.id === node.g);
|
||||
});
|
||||
if (!isSelectedGroup) {
|
||||
RED.group.removeFromGroup(group,node);
|
||||
node.g = group.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user