diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index 7af765da..690f11d3 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -2342,7 +2342,18 @@ var makeActionLister = function(list, filter, pre_order){ return o } - return a[n].apply(a, arguments) + var res = a[n].apply(a, arguments) + + // cleanup -- restore data that was updated by action... + // NOTE: we do not need to worry about partial + // updates as they are done in place... + Object.keys(a).forEach(function(n){ + if(n != 'preventClosing'){ + that[n] = a[n] + } + }) + + return res } // ignore args of actions... } else { @@ -2354,7 +2365,18 @@ var makeActionLister = function(list, filter, pre_order){ return o } - return a[n]() + var res = a[n]() + + // cleanup -- restore data that was updated by action... + // NOTE: we do not need to worry about partial + // updates as they are done in place... + Object.keys(a).forEach(function(n){ + if(n != 'preventClosing'){ + that[n] = a[n] + } + }) + + return res } } })