From c1ccaf85ad323a179e21ecd0353faaaf4f9e640d Mon Sep 17 00:00:00 2001 From: sonora Date: Wed, 7 Jan 2015 17:03:12 +0100 Subject: [PATCH] Back out test code for now --- .../views/controls/MapRouteInfoControl.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java b/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java index 6a4ca96d6a..4625d7fed8 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java @@ -78,15 +78,16 @@ public class MapRouteInfoControl extends MapControls implements IRouteInformatio if(selectFromMapForTarget) { getTargets().navigateToPoint(latlon, true, -1); } 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()) { - routingHelper.recalculateRouteDueToSettingsChange(); - // getTargets().setStartPoint(latlon, true, null); - //} - //----------------- + //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.) + //-Test code only-- + //Try force resuming route re-caculation if stopped due to Issue2515 + //if (!routingHelper.isRouteBeingCalculated()) { + // getTargets().setStartPoint(latlon, true, null); + //} + //or like this: + // routingHelper.recalculateRouteDueToSettingsChange(); + //----------------- } contextMenu.setLocation(latlon, null); showDialog();