From 1d97761eac10b47c0acc389880cdd96d69e93d4d Mon Sep 17 00:00:00 2001 From: sonora Date: Wed, 7 Jan 2015 16:01:08 +0100 Subject: [PATCH] More testing regarding trigger of route-recalculation --- .../plus/views/controls/MapRouteInfoControl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java b/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java index eb84fa0f41..f85eda4df4 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java @@ -80,12 +80,13 @@ public class MapRouteInfoControl extends MapControls implements IRouteInformatio } else { //TODO: Hardy: Looks like there is a small bug somewhere: Re-selecting the "From" or "To" point during an ongoing route calculation (and only then) seems to only interrupt the ongoing route calculation. but not restart it, if (and only if) a route origin other than "Current position" is set. (Looks like this case is treated like a mere position update in our RoutingHelper, so normally no complete re-calculation is needed.) getTargets().setStartPoint(latlon, true, null); - //--- + //-Test code only-- //Try force route re-caculation if stopped due to Issue2515 - if (!routingHelper.isRouteBeingCalculated()) { - getTargets().setStartPoint(latlon, true, null); - } - //--- + //if (!routingHelper.isRouteBeingCalculated()) { + routingHelper.recalculateRouteDueToSettingsChange() + // getTargets().setStartPoint(latlon, true, null); + //} + //----------------- } contextMenu.setLocation(latlon, null); showDialog();