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

Fix redo of subflow create

This commit is contained in:
Nick O'Leary 2019-08-12 14:51:01 +01:00
parent 7d4c2442da
commit c8acc6a12e
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -29,7 +29,7 @@ RED.history = (function() {
inverseEv = {
t: 'multi',
events: []
};
};
len = ev.events.length;
for (i=len-1;i>=0;i--) {
var r = undoEvent(ev.events[i]);
@ -373,7 +373,6 @@ RED.history = (function() {
RED.nodes.filterNodes({z:ev.subflow.subflow.id}).forEach(function(n) {
n.x += ev.subflow.offsetX;
n.y += ev.subflow.offsetY;
n.z = ev.activeWorkspace;
n.dirty = true;
inverseEv.movedNodes.push(n.id);
RED.nodes.moveNodeToTab(n, z);
@ -407,7 +406,7 @@ RED.history = (function() {
inverseEv = {
t: "createSubflow",
activeWorkspace: ev.activeWorkspace,
ditry: RED.nodes.dirty(),
dirty: RED.nodes.dirty(),
};
if (ev.subflow) {
RED.nodes.addSubflow(ev.subflow.subflow);
@ -425,8 +424,8 @@ RED.history = (function() {
nn = RED.nodes.node(nid);
nn.x -= ev.subflow.offsetX;
nn.y -= ev.subflow.offsetY;
nn.z = ev.subflow.subflow.id;
nn.dirty = true;
RED.nodes.moveNodeToTab(nn, ev.subflow.subflow.id);
});
}
if (ev.links) {
@ -447,7 +446,7 @@ RED.history = (function() {
inverseEv = {
t: 'reorder',
order: RED.nodes.getWorkspaceOrder()
};
};
if (ev.order) {
RED.workspaces.order(ev.order);
}