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

Fix event order when quick-adding node to group

This commit is contained in:
Nick O'Leary 2020-06-14 23:44:01 +01:00
parent 0541d9189d
commit 752a080876
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -1051,6 +1051,10 @@ RED.view = (function() {
} }
} }
} }
RED.nodes.add(nn);
RED.editor.validateNode(nn);
if (targetGroup) { if (targetGroup) {
RED.group.addToGroup(targetGroup, nn); RED.group.addToGroup(targetGroup, nn);
if (historyEvent.t !== "multi") { if (historyEvent.t !== "multi") {
@ -1087,8 +1091,6 @@ RED.view = (function() {
historyEvent.removedLinks = [spliceLink]; historyEvent.removedLinks = [spliceLink];
} }
RED.history.push(historyEvent); RED.history.push(historyEvent);
RED.nodes.add(nn);
RED.editor.validateNode(nn);
RED.nodes.dirty(true); RED.nodes.dirty(true);
// auto select dropped node - so info shows (if visible) // auto select dropped node - so info shows (if visible)
clearSelection(); clearSelection();