Remove unnecessary gpx settings for brouter
This commit is contained in:
parent
3c19d1b572
commit
302b6bc203
1 changed files with 6 additions and 5 deletions
|
@ -281,7 +281,7 @@ public class RoutingOptionsHelper {
|
|||
updateRoutingParameterIcons(item);
|
||||
list.add(item);
|
||||
if (item instanceof GpxLocalRoutingParameter) {
|
||||
list.addAll(getGpxRouterParameters());
|
||||
list.addAll(getGpxRouterParameters(am));
|
||||
} else if (item instanceof TimeConditionalRoutingItem) {
|
||||
list.addAll(getOsmandRouterParameters(am));
|
||||
}
|
||||
|
@ -440,10 +440,11 @@ public class RoutingOptionsHelper {
|
|||
return list;
|
||||
}
|
||||
|
||||
public List<LocalRoutingParameter> getGpxRouterParameters() {
|
||||
public List<LocalRoutingParameter> getGpxRouterParameters(ApplicationMode am) {
|
||||
List<LocalRoutingParameter> list = new ArrayList<LocalRoutingParameter>();
|
||||
RouteProvider.GPXRouteParamsBuilder rparams = app.getRoutingHelper().getCurrentGPXRoute();
|
||||
if (rparams != null) {
|
||||
boolean osmandRouter = am.getRouteService() == RouteProvider.RouteService.OSMAND;
|
||||
if (rparams != null && osmandRouter) {
|
||||
GPXUtilities.GPXFile fl = rparams.getFile();
|
||||
if (fl.hasRtePt()) {
|
||||
list.add(new OtherLocalRoutingParameter(R.string.use_points_as_intermediates,
|
||||
|
@ -469,7 +470,7 @@ public class RoutingOptionsHelper {
|
|||
}
|
||||
|
||||
RouteProvider.GPXRouteParamsBuilder rparams = app.getRoutingHelper().getCurrentGPXRoute();
|
||||
List<LocalRoutingParameter> list = new ArrayList<LocalRoutingParameter>(getGpxRouterParameters());
|
||||
List<LocalRoutingParameter> list = new ArrayList<LocalRoutingParameter>(getGpxRouterParameters(am));
|
||||
GeneralRouter rm = SettingsNavigationActivity.getRouter(app.getRoutingConfig(), am);
|
||||
if (rm == null || (rparams != null && !rparams.isCalculateOsmAndRoute()) && !rparams.getFile().hasRtePt()) {
|
||||
return list;
|
||||
|
|
Loading…
Reference in a new issue