mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #3748 from Steve-Mcl/fix-add-junc-undo
include dirty state in history event
This commit is contained in:
commit
e14dd06a94
@ -1089,6 +1089,7 @@ RED.view.tools = (function() {
|
|||||||
linkGroups.sort(function(A,B) {
|
linkGroups.sort(function(A,B) {
|
||||||
return groupedLinks[B].length - groupedLinks[A].length
|
return groupedLinks[B].length - groupedLinks[A].length
|
||||||
})
|
})
|
||||||
|
const wasDirty = RED.nodes.dirty()
|
||||||
linkGroups.forEach(function(gid) {
|
linkGroups.forEach(function(gid) {
|
||||||
var links = groupedLinks[gid]
|
var links = groupedLinks[gid]
|
||||||
var junction = {
|
var junction = {
|
||||||
@ -1179,6 +1180,7 @@ RED.view.tools = (function() {
|
|||||||
})
|
})
|
||||||
if (addedJunctions.length > 0) {
|
if (addedJunctions.length > 0) {
|
||||||
RED.history.push({
|
RED.history.push({
|
||||||
|
dirty: wasDirty,
|
||||||
t: 'add',
|
t: 'add',
|
||||||
links: addedLinks,
|
links: addedLinks,
|
||||||
junctions: addedJunctions,
|
junctions: addedJunctions,
|
||||||
|
Loading…
Reference in New Issue
Block a user