Add check for referencesToRoutes
This commit is contained in:
parent
b6a22a663d
commit
f500c4597f
2 changed files with 5 additions and 1 deletions
|
@ -32,6 +32,10 @@ public class TransportStop extends MapObject {
|
|||
return referencesToRoutes != null && referencesToRoutes.length == 1 && referencesToRoutes[0] == DELETED_STOP;
|
||||
}
|
||||
|
||||
public boolean hasReferencesToRoutes() {
|
||||
return referencesToRoutes != null && referencesToRoutes.length > 0;
|
||||
}
|
||||
|
||||
public void setDeleted() {
|
||||
this.referencesToRoutes = new int[] { DELETED_STOP };
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ public class TransportStopController extends MenuController {
|
|||
|
||||
private void addTransportStopRoutes(List<TransportStop> stops, List<TransportStopRoute> routes, boolean useEnglishNames, TransportIndexRepository t) {
|
||||
for (TransportStop tstop : stops) {
|
||||
if (!tstop.isDeleted()) {
|
||||
if (!tstop.isDeleted() && tstop.hasReferencesToRoutes()) {
|
||||
addRoutes(routes, useEnglishNames, t, tstop, transportStop, (int) MapUtils.getDistance(tstop.getLocation(), transportStop.getLocation()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue