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