Merge pull request #3748 from Steve-Mcl/fix-add-junc-undo

include dirty state in history event
This commit is contained in:
Nick O'Leary 2022-07-08 17:07:27 +01:00 committed by GitHub
commit e14dd06a94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1089,6 +1089,7 @@ RED.view.tools = (function() {
linkGroups.sort(function(A,B) {
return groupedLinks[B].length - groupedLinks[A].length
})
const wasDirty = RED.nodes.dirty()
linkGroups.forEach(function(gid) {
var links = groupedLinks[gid]
var junction = {
@ -1179,6 +1180,7 @@ RED.view.tools = (function() {
})
if (addedJunctions.length > 0) {
RED.history.push({
dirty: wasDirty,
t: 'add',
links: addedLinks,
junctions: addedJunctions,