Fix bug causing first segment of drawn path to be not drawn

When a new segment of a path is drawn the first line was
not drawn when the start coordinates were visible but the
second set was not.
This commit is contained in:
Tjalling Hattink 2016-05-11 19:31:20 +02:00
parent c55b928446
commit e4561ee515

View file

@ -165,6 +165,11 @@ public abstract class OsmandMapLayer {
long intersection = MapAlgorithms.calculateIntersection(x, y,
px, py, 0, w, h, 0);
if (intersection != -1) {
if (pin && (i == 1)) {
cnt++;
path.moveTo(px, py);
start = true;
}
px = (int) (intersection >> 32);
py = (int) (intersection & 0xffffffff);
draw = true;