Fix finding bounds only once

This commit is contained in:
PavelRatushny 2017-08-21 18:48:40 +03:00
parent 123e03edb3
commit 53e20809e1

View file

@ -327,10 +327,10 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
int previousDrawnLocY = -1;
for (int i = 0; i < measurementPoints.size(); i++) {
WptPt pt = measurementPoints.get(i);
if (tb.containsLatLon(pt.lat, pt.lon)) {
int locX = tb.getPixXFromLonNoRot(pt.lon);
int locY = tb.getPixYFromLatNoRot(pt.lat);
if (locX >= 0 && locX <= tb.getPixWidth() && locY >= 0 && locY <= tb.getPixHeight()) {
if (!(inMovePointMode && i == selectedPointPos)) {
int locX = tb.getPixXFromLonNoRot(pt.lon);
int locY = tb.getPixYFromLatNoRot(pt.lat);
boolean xOverlap = false;
boolean yOverlap = false;
if (previousDrawnLocX != -1 && previousDrawnLocY != -1) {