add condition for BuildingInterpolation.ALPHABETIC

This commit is contained in:
Kseniia 2021-01-12 17:52:03 +02:00
parent 318ae3d3cf
commit 925e42546d

View file

@ -115,6 +115,13 @@ public class Building extends MapObject {
int numT = numB; int numT = numB;
if (num >= numB) { if (num >= numB) {
String sname = getName2(); String sname = getName2();
if (getInterpolationType() == BuildingInterpolation.ALPHABETIC) {
char ch = hno.charAt(hno.length() - 1);
char chF = fname.charAt(fname.length() - 1);
if (chF < ch) {
return -1;
}
}
if (fname.contains("-") && sname == null) { if (fname.contains("-") && sname == null) {
int l = fname.indexOf('-'); int l = fname.indexOf('-');
sname = fname.substring(l + 1, fname.length()); sname = fname.substring(l + 1, fname.length());