Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-01-07 17:03:27 +01:00
commit 9616c4d89a

View file

@ -78,15 +78,16 @@ public class MapRouteInfoControl extends MapControls implements IRouteInformatio
if(selectFromMapForTarget) { if(selectFromMapForTarget) {
getTargets().navigateToPoint(latlon, true, -1); getTargets().navigateToPoint(latlon, true, -1);
} 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.)
getTargets().setStartPoint(latlon, true, null); getTargets().setStartPoint(latlon, true, null);
//-Test code only-- //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.)
//Try force route re-caculation if stopped due to Issue2515 //-Test code only--
//if (!routingHelper.isRouteBeingCalculated()) { //Try force resuming route re-caculation if stopped due to Issue2515
routingHelper.recalculateRouteDueToSettingsChange(); //if (!routingHelper.isRouteBeingCalculated()) {
// getTargets().setStartPoint(latlon, true, null); // getTargets().setStartPoint(latlon, true, null);
//} //}
//----------------- //or like this:
// routingHelper.recalculateRouteDueToSettingsChange();
//-----------------
} }
contextMenu.setLocation(latlon, null); contextMenu.setLocation(latlon, null);
showDialog(); showDialog();