From 2b0f47d3a72408ede237e56a4fb5afc03a329e3e Mon Sep 17 00:00:00 2001 From: max-klaus Date: Mon, 27 Jul 2020 11:15:20 +0300 Subject: [PATCH] Fix gpx routing without route --- OsmAnd/src/net/osmand/plus/routing/RouteProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index f9d43df2d2..66985df348 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -253,10 +253,10 @@ public class RouteProvider { } if (OSMAND_ROUTER_V2.equals(file.author)) { route = parseOsmAndGPXRoute(points, file); - addMissingTurns = false; + addMissingTurns = route.isEmpty(); } else if (file.isCloudmadeRouteFile() || OSMAND_ROUTER.equals(file.author)) { directions = parseOsmAndGPXRoute(points, file, OSMAND_ROUTER.equals(file.author), builder.leftSide, 10); - if (OSMAND_ROUTER.equals(file.author)) { + if (OSMAND_ROUTER.equals(file.author) && file.hasRtePt()) { // For files generated by OSMAND_ROUTER use directions contained unaltered addMissingTurns = false; }