From 2227b9e9634eea125f0ec53f04788b100906d2d6 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Wed, 23 Nov 2016 15:45:36 +0300 Subject: [PATCH] Fix contexm menu - download region --- .../src/net/osmand/plus/mapcontextmenu/MenuController.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java index 8c36e5442d..ccd81207fd 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java @@ -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;