More testing regarding trigger of route-recalculation

This commit is contained in:
sonora 2015-01-07 16:01:08 +01:00
parent 0baa9d1456
commit 1d97761eac

View file

@ -80,12 +80,13 @@ public class MapRouteInfoControl extends MapControls implements IRouteInformatio
} else { } 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.) //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); getTargets().setStartPoint(latlon, true, null);
//--- //-Test code only--
//Try force route re-caculation if stopped due to Issue2515 //Try force route re-caculation if stopped due to Issue2515
if (!routingHelper.isRouteBeingCalculated()) { //if (!routingHelper.isRouteBeingCalculated()) {
getTargets().setStartPoint(latlon, true, null); routingHelper.recalculateRouteDueToSettingsChange()
} // getTargets().setStartPoint(latlon, true, null);
//--- //}
//-----------------
} }
contextMenu.setLocation(latlon, null); contextMenu.setLocation(latlon, null);
showDialog(); showDialog();