Fix #3256
This commit is contained in:
parent
af7031bfb6
commit
e1c8d3b336
2 changed files with 23 additions and 16 deletions
|
@ -384,8 +384,12 @@ public class OsmandRegions {
|
|||
}
|
||||
|
||||
public WorldRegion getRegionDataByDownloadName(String downloadName) {
|
||||
if (downloadName == null) {
|
||||
return null;
|
||||
} else {
|
||||
return getRegionData(downloadNamesToFullNames.get(downloadName.toLowerCase()));
|
||||
}
|
||||
}
|
||||
|
||||
public String getDownloadName(BinaryMapDataObject o) {
|
||||
return mapIndexFields.get(mapIndexFields.downloadNameType, o);
|
||||
|
|
|
@ -538,7 +538,9 @@ public abstract class MenuController extends BaseMenuController {
|
|||
String selectedFullName = "";
|
||||
double smallestArea = -1;
|
||||
for (BinaryMapDataObject o : mapDataObjects) {
|
||||
boolean downloaded = checkIfObjectDownloaded(rm, osmandRegions.getDownloadName(o));
|
||||
String downloadName = osmandRegions.getDownloadName(o);
|
||||
if (!Algorithms.isEmpty(downloadName)) {
|
||||
boolean downloaded = checkIfObjectDownloaded(rm, downloadName);
|
||||
if (downloaded) {
|
||||
downloadMapDataObject = null;
|
||||
break;
|
||||
|
@ -556,6 +558,7 @@ public abstract class MenuController extends BaseMenuController {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
downloaded = downloadMapDataObject == null;
|
||||
if (!downloaded) {
|
||||
|
|
Loading…
Reference in a new issue