Fix snap to road after changing ApplicationMode

This commit is contained in:
Alex 2017-08-27 00:32:24 +03:00
parent f09fe36214
commit 0395e35999

View file

@ -93,6 +93,11 @@ public class MeasurementEditingContext {
}
void setSnapToRoadAppMode(ApplicationMode snapToRoadAppMode) {
if (this.snapToRoadAppMode != null
&& !this.snapToRoadAppMode.getStringKey().equals(snapToRoadAppMode.getStringKey())) {
snappedToRoadPoints.clear();
updateCacheForSnapIfNeeded(true);
}
this.snapToRoadAppMode = snapToRoadAppMode;
}