From d5b00ccc84d1988d4adf8c1d20bb2676a1b1c846 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 20 Oct 2015 09:18:11 +0200 Subject: [PATCH] Fix france/britain --- .../net/osmand/plus/download/DownloadResourceGroup.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java b/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java index f686ea8244..9d4b6caebd 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadResourceGroup.java @@ -104,7 +104,8 @@ public class DownloadResourceGroup { public void createHillshadeSRTMGroups() { if(getType().isScreen()) { DownloadResourceGroup regionMaps = getSubGroupById(DownloadResourceGroupType.REGION_MAPS.getDefaultId()); - if(regionMaps != null && regionMaps.size() == 1 && parentGroup != null && parentGroup.getParentGroup() != null) { + if(regionMaps != null && regionMaps.size() == 1 && parentGroup != null && parentGroup.getParentGroup() != null && + isEmpty(getSubGroupById(DownloadResourceGroupType.SUBREGIONS.getDefaultId()))) { IndexItem item = regionMaps.individualResources.get(0); DownloadResourceGroup screenParent = parentGroup.getParentGroup(); if(item.getType() == DownloadActivityType.HILLSHADE_FILE) { @@ -137,6 +138,10 @@ public class DownloadResourceGroup { } } + private boolean isEmpty(DownloadResourceGroup subGroupById) { + return subGroupById == null || subGroupById.isEmpty(); + } + public void addGroup(DownloadResourceGroup g) { if(type.isScreen()) { if(!g.type.isHeader()) {