Add check
This commit is contained in:
parent
40c6ba307b
commit
8a2e953632
1 changed files with 7 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue