From 172dd55d73daf9b51f225e4b64844abd677560ab Mon Sep 17 00:00:00 2001 From: sonora Date: Wed, 7 Jan 2015 08:52:15 +0100 Subject: [PATCH] Test if we can simpy manually interrupt route calculation --- .../plus/views/controls/MapRouteInfoControl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java b/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java index f0780d3b95..1c10c3b69a 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java @@ -79,6 +79,16 @@ public class MapRouteInfoControl extends MapControls implements IRouteInformatio 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.) + + + //Next few lines temporarily only to test something about app behavior + if(getMyApplication().getLocationProvider().getLocationSimulation().isRouteAnimating()) { + getMyApplication().getLocationProvider().getLocationSimulation().startStopRouteAnimation(mapActivity); + } + routingHelper.getVoiceRouter().interruptRouteCommands(); + routingHelper.clearCurrentRoute(null, new ArrayList()); + + getTargets().setStartPoint(latlon, true, null); } contextMenu.setLocation(latlon, null);