Fix contexm menu - download region
This commit is contained in:
parent
865ad4ca2a
commit
2227b9e963
1 changed files with 4 additions and 2 deletions
|
@ -540,15 +540,17 @@ public abstract class MenuController extends BaseMenuController {
|
||||||
}
|
}
|
||||||
String selectedFullName = "";
|
String selectedFullName = "";
|
||||||
double smallestArea = -1;
|
double smallestArea = -1;
|
||||||
|
downloadMapDataObject = null;
|
||||||
for (BinaryMapDataObject o : mapDataObjects) {
|
for (BinaryMapDataObject o : mapDataObjects) {
|
||||||
String downloadName = osmandRegions.getDownloadName(o);
|
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);
|
boolean downloaded = checkIfObjectDownloaded(rm, downloadName);
|
||||||
if (downloaded) {
|
if (downloaded) {
|
||||||
downloadMapDataObject = null;
|
downloadMapDataObject = null;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
String fullName = osmandRegions.getFullName(o);
|
|
||||||
double area = OsmandRegions.getArea(o);
|
double area = OsmandRegions.getArea(o);
|
||||||
if (smallestArea == -1) {
|
if (smallestArea == -1) {
|
||||||
smallestArea = area;
|
smallestArea = area;
|
||||||
|
|
Loading…
Reference in a new issue