mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix deleting node in group after changing selection
This commit is contained in:
parent
56efd51c06
commit
aebb7da3c7
@ -2824,7 +2824,7 @@ RED.view = (function() {
|
|||||||
if (!d3.event.ctrlKey && !d3.event.metaKey) {
|
if (!d3.event.ctrlKey && !d3.event.metaKey) {
|
||||||
// Ctrl not pressed so clear selection
|
// Ctrl not pressed so clear selection
|
||||||
deselectGroup(nodeGroup);
|
deselectGroup(nodeGroup);
|
||||||
selectGroup(nodeGroup,false);
|
selectGroup(nodeGroup,false,false);
|
||||||
}
|
}
|
||||||
// Select this node
|
// Select this node
|
||||||
mousedown_node.selected = true;
|
mousedown_node.selected = true;
|
||||||
@ -3154,12 +3154,14 @@ RED.view = (function() {
|
|||||||
d3.event.stopPropagation();
|
d3.event.stopPropagation();
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectGroup(g, includeNodes) {
|
function selectGroup(g, includeNodes, addToMovingSet) {
|
||||||
if (!g.selected) {
|
if (!g.selected) {
|
||||||
g.selected = true;
|
g.selected = true;
|
||||||
g.dirty = true;
|
g.dirty = true;
|
||||||
}
|
}
|
||||||
|
if (addToMovingSet !== false) {
|
||||||
moving_set.push({n:g});
|
moving_set.push({n:g});
|
||||||
|
}
|
||||||
if (includeNodes) {
|
if (includeNodes) {
|
||||||
var currentSet = new Set(moving_set.map(function(n) { return n.n }));
|
var currentSet = new Set(moving_set.map(function(n) { return n.n }));
|
||||||
var allNodes = RED.group.getNodes(g,true);
|
var allNodes = RED.group.getNodes(g,true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user