fix for #7576
This commit is contained in:
parent
e25fc71f82
commit
bb19a35540
1 changed files with 39 additions and 6 deletions
|
@ -470,8 +470,6 @@ public class RouteDataObject {
|
|||
return pointNameTypes[ind];
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int[] getPointTypes(int ind) {
|
||||
if (pointTypes == null || ind >= pointTypes.length) {
|
||||
return null;
|
||||
|
@ -508,6 +506,41 @@ public class RouteDataObject {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pointTypes != null) {
|
||||
for (int i = 0; i < pointTypes.length; i++) {
|
||||
if (pointTypes[i] != null) {
|
||||
int[] pTypes = pointTypes[i];
|
||||
int pSz = pTypes.length;
|
||||
if (pSz > 0) {
|
||||
for (int j = 0; j < pSz; j++) {
|
||||
RouteTypeRule r = region.quickGetEncodingRule(pTypes[j]);
|
||||
if (r != null && r.conditional()) {
|
||||
int vl = r.conditionalValue(conditionalTime);
|
||||
if (vl != 0) {
|
||||
RouteTypeRule rtr = region.quickGetEncodingRule(vl);
|
||||
String nonCondTag = rtr.getTag();
|
||||
int ks;
|
||||
for (ks = 0; ks < pointTypes[i].length; ks++) {
|
||||
RouteTypeRule toReplace = region.quickGetEncodingRule(pointTypes[i][j]);
|
||||
if (toReplace != null && toReplace.getTag().contentEquals(nonCondTag)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ks == pTypes.length) {
|
||||
int[] ntypes = new int[pTypes.length + 1];
|
||||
System.arraycopy(pTypes, 0, ntypes, 0, pTypes.length);
|
||||
pTypes = ntypes;
|
||||
}
|
||||
pTypes[ks] = vl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pointTypes[i] = pTypes;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public float getMaximumSpeed(boolean direction) {
|
||||
|
|
Loading…
Reference in a new issue