Clear undo history when clearing document
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@252 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -1202,6 +1202,10 @@ function SvgCanvas(c)
|
||||
i++;
|
||||
}
|
||||
}
|
||||
// clear the undo stack
|
||||
console.log(undoStack);
|
||||
resetUndoStack();
|
||||
console.log(undoStack);
|
||||
call("cleared");
|
||||
};
|
||||
|
||||
@@ -1438,6 +1442,11 @@ function SvgCanvas(c)
|
||||
}
|
||||
};
|
||||
|
||||
var resetUndoStack = function() {
|
||||
undoStack = [];
|
||||
undoStackPointer = 0;
|
||||
};
|
||||
|
||||
this.getUndoStackSize = function() { return undoStackPointer; }
|
||||
this.getRedoStackSize = function() { return undoStack.length - undoStackPointer; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user