Fix contexm menu - download region

This commit is contained in:
Alexey Kulish 2016-11-23 15:45:36 +03:00
parent bb1a230262
commit 33664efa21

View file

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