diff --git a/js/id/behavior/draw_way.js b/js/id/behavior/draw_way.js index c741abf90..4a6be8636 100644 --- a/js/id/behavior/draw_way.js +++ b/js/id/behavior/draw_way.js @@ -44,6 +44,7 @@ iD.behavior.DrawWay = function(context, wayId, index, mode, baseGraph) { } function undone() { + finished = true; context.enter(iD.modes.Browse(context)); } diff --git a/js/id/core/history.js b/js/id/core/history.js index 65078835c..2f3c30036 100644 --- a/js/id/core/history.js +++ b/js/id/core/history.js @@ -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--; diff --git a/test/spec/core/history.js b/test/spec/core/history.js index 699e244f8..ae1acb933 100644 --- a/test/spec/core/history.js +++ b/test/spec/core/history.js @@ -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();