diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 57c499407f..e6f6b78f2f 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -503,15 +503,8 @@ public class MapActivityActions implements DialogProvider { mapActivity.getRoutingHelper().setGpxParams(null); settings.FOLLOW_THE_GPX_ROUTE.set(null); } else { - GPXRouteParamsBuilder params = new GPXRouteParamsBuilder(result, mapActivity.getMyApplication() - .getSettings()); - if (result.hasRtePt() && !result.hasTrkPt()) { - settings.GPX_CALCULATE_RTEPT.set(true); - } else { - settings.GPX_CALCULATE_RTEPT.set(false); - } + GPXRouteParamsBuilder params = new GPXRouteParamsBuilder(result, settings); params.setCalculateOsmAndRouteParts(settings.GPX_ROUTE_CALC_OSMAND_PARTS.get()); - params.setUseIntermediatePointsRTE(settings.GPX_CALCULATE_RTEPT.get()); params.setCalculateOsmAndRoute(settings.GPX_ROUTE_CALC.get()); List ps = params.getPoints(settings.getContext()); mapActivity.getRoutingHelper().setGpxParams(params); diff --git a/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java b/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java index c86b6078ff..d47eb92724 100644 --- a/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java +++ b/OsmAnd/src/net/osmand/plus/base/FailSafeFuntions.java @@ -131,9 +131,6 @@ public class FailSafeFuntions { if (settings.GPX_ROUTE_CALC_OSMAND_PARTS.get()) { gpxRoute.setCalculateOsmAndRouteParts(true); } - if (settings.GPX_CALCULATE_RTEPT.get()) { - gpxRoute.setUseIntermediatePointsRTE(true); - } if(settings.GPX_ROUTE_CALC.get()) { gpxRoute.setCalculateOsmAndRoute(true); } diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java index a55010fffe..980c94a207 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/RoutingOptionsHelper.java @@ -265,9 +265,6 @@ public class RoutingOptionsHelper { settings.GPX_ROUTE_CALC_OSMAND_PARTS.set(selected); } else if (gpxParam.id == R.string.gpx_option_from_start_point) { rp.setPassWholeRoute(selected); - } else if (gpxParam.id == R.string.use_points_as_intermediates) { - settings.GPX_CALCULATE_RTEPT.set(selected); - rp.setUseIntermediatePointsRTE(selected); } else if (gpxParam.id == R.string.calculate_osmand_route_gpx) { settings.GPX_ROUTE_CALC.set(selected); rp.setCalculateOsmAndRoute(selected); @@ -467,11 +464,6 @@ public class RoutingOptionsHelper { GPXRouteParamsBuilder rparams = routingHelper.getCurrentGPXRoute(); boolean osmandRouter = am.getRouteService() == RouteService.OSMAND; if (rparams != null && osmandRouter) { - GPXUtilities.GPXFile fl = rparams.getFile(); - if (fl.hasRtePt()) { - list.add(new OtherLocalRoutingParameter(R.string.use_points_as_intermediates, - app.getString(R.string.use_points_as_intermediates), rparams.isUseIntermediatePointsRTE())); - } if (!routingHelper.isCurrentGPXRouteV2()) { list.add(new OtherLocalRoutingParameter(R.string.gpx_option_reverse_route, app.getString(R.string.gpx_option_reverse_route), rparams.isReverse())); diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index 9433e325f6..a2743eba58 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -165,7 +165,6 @@ public class RouteProvider { private boolean leftSide; private boolean passWholeRoute; private boolean calculateOsmAndRouteParts; - private boolean useIntermediatePointsRTE; public GPXRouteParamsBuilder(GPXFile file, OsmandSettings settings) { leftSide = settings.DRIVING_REGION.get().leftHandDriving; @@ -184,12 +183,8 @@ public class RouteProvider { this.calculateOsmAndRouteParts = calculateOsmAndRouteParts; } - public void setUseIntermediatePointsRTE(boolean useIntermediatePointsRTE) { - this.useIntermediatePointsRTE = useIntermediatePointsRTE; - } - public boolean isUseIntermediatePointsRTE() { - return useIntermediatePointsRTE; + return file.hasRtePt() && !file.hasTrkPt(); } public boolean isCalculateOsmAndRoute() { @@ -277,7 +272,7 @@ public class RouteProvider { boolean reverse = builder.reverse; passWholeRoute = builder.passWholeRoute; calculateOsmAndRouteParts = builder.calculateOsmAndRouteParts; - useIntermediatePointsRTE = builder.useIntermediatePointsRTE; + useIntermediatePointsRTE = builder.isUseIntermediatePointsRTE(); builder.calculateOsmAndRoute = false; // Disabled temporary builder.calculateOsmAndRoute; if (!file.isPointsEmpty()) { wpt = new ArrayList(file.getPoints().size()); diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java index 289e2c62f3..d6cdc2c813 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java @@ -2182,7 +2182,7 @@ public class OsmandSettings { }.makeProfile().cache(); public final OsmandPreference GPX_ROUTE_CALC_OSMAND_PARTS = new BooleanPreference("gpx_routing_calculate_osmand_route", true).makeGlobal().cache(); - public final OsmandPreference GPX_CALCULATE_RTEPT = new BooleanPreference("gpx_routing_calculate_rtept", true).makeGlobal().cache(); +// public final OsmandPreference GPX_CALCULATE_RTEPT = new BooleanPreference("gpx_routing_calculate_rtept", true).makeGlobal().cache(); public final OsmandPreference GPX_ROUTE_CALC = new BooleanPreference("calc_gpx_route", false).makeGlobal().cache(); public final OsmandPreference AVOID_TOLL_ROADS = new BooleanPreference("avoid_toll_roads", false).makeProfile().cache();