Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
163cf694a3
2 changed files with 23 additions and 18 deletions
|
@ -62,7 +62,8 @@ public class CurrentPositionHelper {
|
|||
private void scheduleRouteSegmentFind(final Location loc) {
|
||||
if (calculatingThread == Thread.currentThread()) {
|
||||
lastFound = runUpdateInThreadCatch(loc.getLatitude(), loc.getLongitude());
|
||||
} else if(calculatingThread == null && loc != null) {
|
||||
} else if (loc != null) {
|
||||
if (calculatingThread == null) {
|
||||
Runnable run = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -78,6 +79,9 @@ public class CurrentPositionHelper {
|
|||
}
|
||||
};
|
||||
calculatingThread = app.getRoutingHelper().startTaskInRouteThreadIfPossible(run);
|
||||
} else if (!calculatingThread.isAlive()) {
|
||||
calculatingThread = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -823,9 +823,10 @@ public class RoutingHelper {
|
|||
}, "Calculating position"); //$NON-NLS-1$
|
||||
currentRunningJob.start();
|
||||
}
|
||||
}
|
||||
return currentRunningJob;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private void updateProgress(final RouteCalculationProgress calculationProgress) {
|
||||
|
|
Loading…
Reference in a new issue