mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
Fix undo right after drawing line or area
This commit is contained in:
@@ -43,7 +43,7 @@ iD.modes.DrawArea = function(wayId) {
|
||||
|
||||
if (datum.id === tailId || datum.id === headId) {
|
||||
if (way.nodes.length > 3) {
|
||||
history.replace(iD.actions.DeleteNode(node.id));
|
||||
history.undo();
|
||||
controller.enter(iD.modes.Select(way));
|
||||
} else {
|
||||
// Areas with less than 3 nodes gets deleted
|
||||
|
||||
@@ -57,7 +57,7 @@ iD.modes.DrawLine = function(wayId, direction) {
|
||||
|
||||
} else if (datum.id === headId) {
|
||||
// finish the way
|
||||
history.replace(iD.actions.DeleteNode(node.id));
|
||||
history.undo();
|
||||
|
||||
controller.enter(iD.modes.Select(way));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user