From 88156c0370939349b1a460d1b8a04ba15ff6b03e Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Mon, 6 Oct 2014 14:10:57 -0400 Subject: [PATCH] Swap secondary and primary turns if the secondary turn is actually the turn being made. --- .../src/net/osmand/router/RouteResultPreparation.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java index 52a01bc0e1..d7bbe78341 100644 --- a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java @@ -661,7 +661,13 @@ public class RouteResultPreparation { if (TurnType.getPrimaryTurn(t.getLanes()[i]) == 0) { t.setPrimaryTurn(i, turn); } else { - t.setSecondaryTurn(i, turn); + if (turn == t.getValue()) { + t.setSecondaryTurn(i, TurnType.getPrimaryTurn(t.getLanes()[i])); + t.setPrimaryTurn(i, turn); + } else { + t.setSecondaryTurn(i, turn); + } + break; // Move on to the next lane } }