From e50e70a9f6e6bfefce974157a93ea2c52c842b09 Mon Sep 17 00:00:00 2001 From: sonora Date: Mon, 5 Jan 2015 20:42:25 +0100 Subject: [PATCH] More debugging to check out the route recalculating behavior if route points change with an origin set other than "current position" --- .../net/osmand/plus/views/controls/MapRouteInfoControl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java b/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java index b73fa2394e..82b29a759a 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java @@ -75,10 +75,12 @@ public class MapRouteInfoControl extends MapControls implements IRouteInformatio if(selectFromMapTouch) { LatLon latlon = tileBox.getLatLonFromPixel(point.x, point.y); selectFromMapTouch = false; - //TODO: Hardy: Looks like there is a small bug here somewhere: Re-selecting the "From" or "To" point during an ongoing route calculation (and only then) seems to (sometimes?) only interrupt the ongoing route calculation, but not restart it again with the new points 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.) + //So let's see if we can trigger route-recalculation duing an ongoing calculation by the inserting the following line + getTargets().clearStartPoint(true); getTargets().setStartPoint(latlon, true, null); } contextMenu.setLocation(latlon, null);