mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
Don't assume that all the ids in selectedIDs are valid
(This is becuse they might have been deleted in a delete operation and we are immediately redrawing the results of that operation before reselecting something else)
This commit is contained in:
@@ -44,13 +44,14 @@ export function operationDelete(selectedIDs, context) {
|
||||
}
|
||||
}
|
||||
|
||||
context.perform(action, annotation);
|
||||
|
||||
if (nextSelectedID && context.hasEntity(nextSelectedID)) {
|
||||
context.enter(modeSelect(context, [nextSelectedID]));
|
||||
} else {
|
||||
context.enter(modeBrowse(context));
|
||||
}
|
||||
|
||||
context.perform(action, annotation);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -615,7 +615,8 @@ export function svgLabels(projection, context) {
|
||||
|
||||
// hide labels along selected ways, or near selected vertices
|
||||
for (var i = 0; i < selectedIDs.length; i++) {
|
||||
var entity = graph.entity(selectedIDs[i]);
|
||||
var entity = graph.hasEntity(selectedIDs[i]);
|
||||
if (!entity) continue;
|
||||
var geometry = entity.geometry(graph);
|
||||
|
||||
if (geometry === 'line') {
|
||||
|
||||
Reference in New Issue
Block a user