Fix small issues
This commit is contained in:
parent
0055c3edd0
commit
60d2c91bda
2 changed files with 11 additions and 6 deletions
|
@ -317,7 +317,7 @@ public class RoutePlannerFrontEnd {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private RouteSegment getRecalculationEnd(final RoutingContext ctx) {
|
public RouteSegment getRecalculationEnd(final RoutingContext ctx) {
|
||||||
RouteSegment recalculationEnd = null;
|
RouteSegment recalculationEnd = null;
|
||||||
boolean runRecalculation = ctx.previouslyCalculatedRoute != null && ctx.previouslyCalculatedRoute.size() > 0
|
boolean runRecalculation = ctx.previouslyCalculatedRoute != null && ctx.previouslyCalculatedRoute.size() > 0
|
||||||
&& ctx.config.recalculateDistance != 0;
|
&& ctx.config.recalculateDistance != 0;
|
||||||
|
|
|
@ -44,6 +44,7 @@ import net.osmand.plus.TargetPointsHelper.TargetPoint;
|
||||||
import net.osmand.plus.Version;
|
import net.osmand.plus.Version;
|
||||||
import net.osmand.plus.activities.SettingsNavigationActivity;
|
import net.osmand.plus.activities.SettingsNavigationActivity;
|
||||||
import net.osmand.plus.render.NativeOsmandLibrary;
|
import net.osmand.plus.render.NativeOsmandLibrary;
|
||||||
|
import net.osmand.router.BinaryRoutePlanner.RouteSegment;
|
||||||
import net.osmand.router.GeneralRouter;
|
import net.osmand.router.GeneralRouter;
|
||||||
import net.osmand.router.GeneralRouter.GeneralRouterProfile;
|
import net.osmand.router.GeneralRouter.GeneralRouterProfile;
|
||||||
import net.osmand.router.GeneralRouter.RoutingParameter;
|
import net.osmand.router.GeneralRouter.RoutingParameter;
|
||||||
|
@ -662,6 +663,14 @@ public class RouteProvider {
|
||||||
RoutingContext complexCtx = null;
|
RoutingContext complexCtx = null;
|
||||||
boolean complex = params.mode.isDerivedRoutingFrom(ApplicationMode.CAR) && !settings.DISABLE_COMPLEX_ROUTING.get()
|
boolean complex = params.mode.isDerivedRoutingFrom(ApplicationMode.CAR) && !settings.DISABLE_COMPLEX_ROUTING.get()
|
||||||
&& precalculated == null;
|
&& precalculated == null;
|
||||||
|
ctx.leftSideNavigation = params.leftSide;
|
||||||
|
ctx.calculationProgress = params.calculationProgress;
|
||||||
|
if(params.previousToRecalculate != null && params.onlyStartPointChanged) {
|
||||||
|
ctx.previouslyCalculatedRoute = params.previousToRecalculate.getOriginalRoute();
|
||||||
|
}
|
||||||
|
if(complex && router.getRecalculationEnd(ctx) != null) {
|
||||||
|
complex = false;
|
||||||
|
}
|
||||||
if(complex) {
|
if(complex) {
|
||||||
complexCtx = router.buildRoutingContext(cf, lib,files,
|
complexCtx = router.buildRoutingContext(cf, lib,files,
|
||||||
RouteCalculationMode.COMPLEX);
|
RouteCalculationMode.COMPLEX);
|
||||||
|
@ -671,11 +680,7 @@ public class RouteProvider {
|
||||||
complexCtx.previouslyCalculatedRoute = params.previousToRecalculate.getOriginalRoute();
|
complexCtx.previouslyCalculatedRoute = params.previousToRecalculate.getOriginalRoute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctx.leftSideNavigation = params.leftSide;
|
|
||||||
ctx.calculationProgress = params.calculationProgress;
|
|
||||||
if(params.previousToRecalculate != null && params.onlyStartPointChanged) {
|
|
||||||
ctx.previouslyCalculatedRoute = params.previousToRecalculate.getOriginalRoute();
|
|
||||||
}
|
|
||||||
LatLon st = new LatLon(params.start.getLatitude(), params.start.getLongitude());
|
LatLon st = new LatLon(params.start.getLatitude(), params.start.getLongitude());
|
||||||
LatLon en = new LatLon(params.end.getLatitude(), params.end.getLongitude());
|
LatLon en = new LatLon(params.end.getLatitude(), params.end.getLongitude());
|
||||||
List<LatLon> inters = new ArrayList<LatLon>();
|
List<LatLon> inters = new ArrayList<LatLon>();
|
||||||
|
|
Loading…
Reference in a new issue