Deselect before deleting an entity

This avoids errors produced by attempts to generate turns for
ways that were just deleted.
This commit is contained in:
John Firebaugh
2014-05-09 16:45:29 -07:00
parent 93758b7ab9
commit f5b29989f5
+4 -4
View File
@@ -36,15 +36,15 @@ iD.operations.Delete = function(selectedIDs, context) {
}
}
context.perform(
action,
annotation);
if (nextSelectedID && context.hasEntity(nextSelectedID)) {
context.enter(iD.modes.Select(context, [nextSelectedID]));
} else {
context.enter(iD.modes.Browse(context));
}
context.perform(
action,
annotation);
};
operation.available = function() {