diff --git a/src/js/undomanager/undomain.js b/src/js/undomanager/undomain.js index 1e69d35ec..e62f9ab24 100644 --- a/src/js/undomanager/undomain.js +++ b/src/js/undomanager/undomain.js @@ -9,7 +9,6 @@ var addUndoStackExtensionMaker = function(performanceAwareCaller) { viewModel.contentListeners(viewModel.contentListeners() + 2); - // TODO the labels should be computed observables (needs changes in undomanager projects) var undoRedoStack = undoManager(viewModel.content, { levels: 100, undoLabel: ko.computed(function() { return viewModel.t("Undo (#COUNT#)"); }), @@ -26,6 +25,8 @@ var addUndoStackExtensionMaker = function(performanceAwareCaller) { undoRedoStack.setUndoActionMaker(undoserializer.makeUndoAction.bind(undefined, viewModel.content)); undoserializer.watchEnabled(true); + viewModel.undoSerializer = undoserializer; + return { pause: function() { undoRedoStack.setModeIgnore();