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
1 changed files with 4 additions and 2 deletions

View File

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