Add check

This commit is contained in:
Alexander Sytnyk 2017-08-02 11:20:49 +03:00
parent 40c6ba307b
commit 8a2e953632

View file

@ -134,7 +134,13 @@ public class MeasurementToolLayer extends OsmandMapLayer {
WptPt pt = new WptPt();
pt.lat = l.getLatitude();
pt.lon = l.getLongitude();
measurementPoints.add(pt);
if (measurementPoints.size() > 0) {
if (!measurementPoints.get(measurementPoints.size() - 1).equals(pt)) {
measurementPoints.add(pt);
}
} else {
measurementPoints.add(pt);
}
view.refreshMap();
}