Fix exiting from snap to road
This commit is contained in:
parent
a70424f529
commit
1decb4e9fd
2 changed files with 5 additions and 3 deletions
|
@ -180,8 +180,10 @@ public class MeasurementEditingContext {
|
||||||
before.points.clear();
|
before.points.clear();
|
||||||
after.points.clear();
|
after.points.clear();
|
||||||
if (inSnapToRoadMode) {
|
if (inSnapToRoadMode) {
|
||||||
beforeCacheForSnap.points.clear();
|
if (beforeCacheForSnap != null && afterCacheForSnap != null) {
|
||||||
afterCacheForSnap.points.clear();
|
beforeCacheForSnap.points.clear();
|
||||||
|
afterCacheForSnap.points.clear();
|
||||||
|
}
|
||||||
needUpdateCacheForSnap = true;
|
needUpdateCacheForSnap = true;
|
||||||
} else {
|
} else {
|
||||||
beforeCacheForSnap = null;
|
beforeCacheForSnap = null;
|
||||||
|
|
|
@ -1395,7 +1395,7 @@ public class MeasurementToolFragment extends Fragment {
|
||||||
hidePointsList();
|
hidePointsList();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (editingCtx.getPointsCount() < 1 || saved) {
|
if (editingCtx.getPointsCount() == 0 || saved) {
|
||||||
dismiss(mapActivity);
|
dismiss(mapActivity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue