diff --git a/public/red/history.js b/public/red/history.js index 2cdd2ae18..79c49ae1a 100644 --- a/public/red/history.js +++ b/public/red/history.js @@ -32,10 +32,16 @@ RED.history = (function() { pop: function() { var ev = undo_history.pop(); var i; + var node; + var modifiedTabs = {}; if (ev) { if (ev.t == 'add') { if (ev.nodes) { for (i=0;i n.ports.length) { - n.ports.push(n.ports.length); - } - n.resize = true; - n.dirty = true; + RED.nodes.filterNodes({type:"subflow:"+subflow.id}).forEach(function(n) { + n.changed = true; + n.inputs = subflow.in.length; + n.outputs = subflow.out.length; + while (n.outputs > n.ports.length) { + n.ports.push(n.ports.length); } + n.resize = true; + n.dirty = true; }); } if (ev.nodes) { for (i=0;i