Always clear pressedLatLon

This commit is contained in:
PavelRatushny 2017-08-15 15:36:41 +03:00
parent 6baed758a9
commit dd5017a42e

View file

@ -351,11 +351,11 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
WptPt pt = new WptPt();
pt.lat = pressedPointLatLon.getLatitude();
pt.lon = pressedPointLatLon.getLongitude();
pressedPointLatLon = null;
boolean allowed = measurementPoints.size() == 0 || !measurementPoints.get(measurementPoints.size() - 1).equals(pt);
if (allowed) {
measurementPoints.add(position, pt);
moveMapToPoint(position);
pressedPointLatLon = null;
return pt;
}
}