Fix drawing points if only one
This commit is contained in:
parent
6c3d9b5dd9
commit
4d6868f122
1 changed files with 1 additions and 9 deletions
|
@ -258,7 +258,7 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
|
|||
}
|
||||
}
|
||||
int rightPointPos = -1;
|
||||
for (int i = measurementPoints.size() - 1; i > leftPointPos; i--) {
|
||||
for (int i = measurementPoints.size() - 1; i >= leftPointPos; i--) {
|
||||
WptPt pt = measurementPoints.get(i);
|
||||
if (tb.containsLatLon(pt.lat, pt.lon)) {
|
||||
rightPointPos = i;
|
||||
|
@ -336,14 +336,6 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
|
|||
drawnPointsPositions.add(i);
|
||||
}
|
||||
}
|
||||
} else if (leftPointPos != -1) {
|
||||
WptPt pt = measurementPoints.get(leftPointPos);
|
||||
if (!(inMovePointMode && leftPointPos == selectedPointPos)) {
|
||||
int locX = tb.getPixXFromLonNoRot(pt.lon);
|
||||
int locY = tb.getPixYFromLatNoRot(pt.lat);
|
||||
canvas.drawBitmap(pointIcon, locX - marginPointIconX, locY - marginPointIconY, bitmapPaint);
|
||||
drawnPointsPositions.add(leftPointPos);
|
||||
}
|
||||
}
|
||||
if (inAddPointAfterMode || inAddPointBeforeMode || inMovePointMode) {
|
||||
int locX = tb.getCenterPixelX();
|
||||
|
|
Loading…
Reference in a new issue