Fix context menu

This commit is contained in:
Alexey Kulish 2016-11-23 16:02:16 +03:00
parent 2227b9e963
commit 6fc0ce85e7

View file

@ -543,14 +543,15 @@ public abstract class MenuController extends BaseMenuController {
downloadMapDataObject = null;
for (BinaryMapDataObject o : mapDataObjects) {
String downloadName = osmandRegions.getDownloadName(o);
String fullName = osmandRegions.getFullName(o);
WorldRegion region = osmandRegions.getRegionData(fullName);
if (!Algorithms.isEmpty(downloadName) && region.isRegionMapDownload()) {
if (!Algorithms.isEmpty(downloadName)) {
boolean downloaded = checkIfObjectDownloaded(rm, downloadName);
if (downloaded) {
downloadMapDataObject = null;
break;
} else {
String fullName = osmandRegions.getFullName(o);
WorldRegion region = osmandRegions.getRegionData(fullName);
if (region != null && region.isRegionMapDownload()) {
double area = OsmandRegions.getArea(o);
if (smallestArea == -1) {
smallestArea = area;
@ -564,6 +565,7 @@ public abstract class MenuController extends BaseMenuController {
}
}
}
}
downloaded = downloadMapDataObject == null;
if (!downloaded) {