reset undo stack after setValue() calls

This commit is contained in:
Fabian Jakobs 2011-02-19 11:36:58 +01:00
commit b01e4c8640
2 changed files with 11 additions and 5 deletions

View file

@ -38,8 +38,7 @@
define(function(require, exports, module) {
var UndoManager = function() {
this.$undoStack = [];
this.$redoStack = [];
this.reset();
};
(function() {
@ -65,6 +64,11 @@ var UndoManager = function() {
this.$undoStack.push(deltas);
}
};
this.reset = function() {
this.$undoStack = [];
this.$redoStack = [];
};
}).call(UndoManager.prototype);