From 5e886ea3a9a131636116ee6841973668e42d1b06 Mon Sep 17 00:00:00 2001 From: sonora Date: Mon, 10 Jun 2013 14:50:10 +0200 Subject: [PATCH] try fix bug of "Ad as last waypoint" code --- .../net/osmand/plus/activities/MapActivityActions.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 20c1295334..761b3eea66 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -1297,9 +1297,12 @@ public class MapActivityActions implements DialogProvider { } else if(which == 2) { int sz = targetPointsHelper.getIntermediatePoints().size(); LatLon pt = targetPointsHelper.getPointToNavigate(); - settings.insertIntermediatePoint(pt.getLatitude(), pt.getLongitude(), - settings.getPointNavigateDescription(), sz, true); - settings.setPointToNavigate(lat, lon, true, name); + settings.insertIntermediatePoint(lat, lon, name, sz, true); + settings.setPointToNavigate(pt.getLatitude(), pt.getLongitude(), true, settings.getPointNavigateDescription()); + // I believe the following prior code was buggy, Hardy 2013-06-10: + //settings.insertIntermediatePoint(pt.getLatitude(), pt.getLongitude(), + // settings.getPointNavigateDescription(), sz, true); + //settings.setPointToNavigate(lat, lon, true, name); } else { settings.insertIntermediatePoint(lat, lon, name, 0, true); }