From 9d64f980900b23407a01bdab41338f2d5f127875 Mon Sep 17 00:00:00 2001 From: Gijs de Rooy Date: Sun, 16 Feb 2014 15:12:16 +0100 Subject: [PATCH] NavDisplay: waypoint drawing fix --- Nasal/canvas/map/route.draw | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Nasal/canvas/map/route.draw b/Nasal/canvas/map/route.draw index d71f96dc5..10f666cfc 100644 --- a/Nasal/canvas/map/route.draw +++ b/Nasal/canvas/map/route.draw @@ -45,16 +45,18 @@ var draw_route = func (group, theroute, controller=nil, lod=0) { if (i == 0) { var leg = fp.getWP(1); + var j = 0; foreach (var pt; leg.path()) { append(coords,"N"~pt.lat); append(coords,"E"~pt.lon); - if (i==0){ + if (j==0){ append(cmds,2); - i+=1; + j=1; } else append(cmds,4); } canvas.drawwp(group, leg.path()[0].lat, leg.path()[0].lon, fp.getWP(0).alt_cstr, fp.getWP(0).wp_name, i, wp); + i+=1; } var leg = fp.getWP(i); foreach (var pt; leg.path()) {