Fix #1120, inconsistent undo for line/area drawing

Gulp!
This commit is contained in:
John Firebaugh
2013-03-27 16:25:10 -07:00
parent 5eebf816ee
commit f7fb12be76
3 changed files with 1 additions and 13 deletions

View File

@@ -44,6 +44,7 @@ iD.behavior.DrawWay = function(context, wayId, index, mode, baseGraph) {
}
function undone() {
finished = true;
context.enter(iD.modes.Browse(context));
}

View File

@@ -89,12 +89,6 @@ iD.History = function(context) {
undo: function() {
var previous = stack[index].graph;
// Pop to the first annotated state.
while (index > 0) {
if (stack[index].annotation) break;
index--;
}
// Pop to the next annotated state.
while (index > 0) {
index--;

View File

@@ -132,13 +132,6 @@ describe("iD.History", function () {
expect(history.undoAnnotation()).to.be.undefined;
});
it("pops past unannotated states", function () {
history.perform(action, "annotation");
history.perform(action);
history.undo();
expect(history.undoAnnotation()).to.be.undefined;
});
it("pushes the redo stack", function () {
history.perform(action, "annotation");
history.undo();