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) {
|
||||
// Ctrl not pressed so clear selection
|
||||
deselectGroup(nodeGroup);
|
||||
selectGroup(nodeGroup,false);
|
||||
selectGroup(nodeGroup,false,false);
|
||||
}
|
||||
// Select this node
|
||||
mousedown_node.selected = true;
|
||||
@ -3154,12 +3154,14 @@ RED.view = (function() {
|
||||
d3.event.stopPropagation();
|
||||
}
|
||||
|
||||
function selectGroup(g, includeNodes) {
|
||||
function selectGroup(g, includeNodes, addToMovingSet) {
|
||||
if (!g.selected) {
|
||||
g.selected = true;
|
||||
g.dirty = true;
|
||||
}
|
||||
moving_set.push({n:g});
|
||||
if (addToMovingSet !== false) {
|
||||
moving_set.push({n:g});
|
||||
}
|
||||
if (includeNodes) {
|
||||
var currentSet = new Set(moving_set.map(function(n) { return n.n }));
|
||||
var allNodes = RED.group.getNodes(g,true);
|
||||
|
Loading…
Reference in New Issue
Block a user