Fix exiting from snap to road

This commit is contained in:
PavelRatushny 2017-09-04 10:25:14 +03:00
parent a70424f529
commit 1decb4e9fd
2 changed files with 5 additions and 3 deletions

View file

@ -180,8 +180,10 @@ public class MeasurementEditingContext {
before.points.clear();
after.points.clear();
if (inSnapToRoadMode) {
if (beforeCacheForSnap != null && afterCacheForSnap != null) {
beforeCacheForSnap.points.clear();
afterCacheForSnap.points.clear();
}
needUpdateCacheForSnap = true;
} else {
beforeCacheForSnap = null;

View file

@ -1395,7 +1395,7 @@ public class MeasurementToolFragment extends Fragment {
hidePointsList();
return;
}
if (editingCtx.getPointsCount() < 1 || saved) {
if (editingCtx.getPointsCount() == 0 || saved) {
dismiss(mapActivity);
return;
}