Fix context menu
This commit is contained in:
parent
2227b9e963
commit
6fc0ce85e7
1 changed files with 14 additions and 12 deletions
|
@ -543,14 +543,15 @@ public abstract class MenuController extends BaseMenuController {
|
||||||
downloadMapDataObject = null;
|
downloadMapDataObject = null;
|
||||||
for (BinaryMapDataObject o : mapDataObjects) {
|
for (BinaryMapDataObject o : mapDataObjects) {
|
||||||
String downloadName = osmandRegions.getDownloadName(o);
|
String downloadName = osmandRegions.getDownloadName(o);
|
||||||
String fullName = osmandRegions.getFullName(o);
|
if (!Algorithms.isEmpty(downloadName)) {
|
||||||
WorldRegion region = osmandRegions.getRegionData(fullName);
|
|
||||||
if (!Algorithms.isEmpty(downloadName) && region.isRegionMapDownload()) {
|
|
||||||
boolean downloaded = checkIfObjectDownloaded(rm, downloadName);
|
boolean downloaded = checkIfObjectDownloaded(rm, downloadName);
|
||||||
if (downloaded) {
|
if (downloaded) {
|
||||||
downloadMapDataObject = null;
|
downloadMapDataObject = null;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
String fullName = osmandRegions.getFullName(o);
|
||||||
|
WorldRegion region = osmandRegions.getRegionData(fullName);
|
||||||
|
if (region != null && region.isRegionMapDownload()) {
|
||||||
double area = OsmandRegions.getArea(o);
|
double area = OsmandRegions.getArea(o);
|
||||||
if (smallestArea == -1) {
|
if (smallestArea == -1) {
|
||||||
smallestArea = area;
|
smallestArea = area;
|
||||||
|
@ -564,6 +565,7 @@ public abstract class MenuController extends BaseMenuController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
downloaded = downloadMapDataObject == null;
|
downloaded = downloadMapDataObject == null;
|
||||||
if (!downloaded) {
|
if (!downloaded) {
|
||||||
|
|
Loading…
Reference in a new issue