fixed jira issue 92. Cancelling recalculation of route if it was already calculated.
This commit is contained in:
parent
d3a5fe8b27
commit
be10b3dfbb
1 changed files with 4 additions and 0 deletions
|
@ -288,7 +288,11 @@ public class RoutingHelper {
|
|||
if (calculateRoute) {
|
||||
recalculateRouteInBackground(false, currentLocation, finalLocation, intermediatePoints, currentGPXRoute,
|
||||
previousRoute.isCalculated() ? previousRoute : null);
|
||||
} else if (currentRunningJob != null && currentRunningJob instanceof RouteRecalculationThread) {
|
||||
RouteRecalculationThread thread = (RouteRecalculationThread) currentRunningJob;
|
||||
thread.stopCalculation();
|
||||
}
|
||||
|
||||
double projectDist = mode != null && mode.hasFastSpeed() ? posTolerance : posTolerance / 2;
|
||||
if(returnUpdatedLocation && locationProjection != null && currentLocation.distanceTo(locationProjection) < projectDist) {
|
||||
return locationProjection;
|
||||
|
|
Loading…
Reference in a new issue