diff --git a/OsmAnd/src/net/osmand/data/PointDescription.java b/OsmAnd/src/net/osmand/data/PointDescription.java index 5e318bf0cc..c44aa9a6b6 100644 --- a/OsmAnd/src/net/osmand/data/PointDescription.java +++ b/OsmAnd/src/net/osmand/data/PointDescription.java @@ -41,6 +41,7 @@ public class PointDescription { public static final String POINT_TYPE_OSM_BUG = "bug"; public static final String POINT_TYPE_WORLD_REGION = "world_region"; public static final String POINT_TYPE_GPX_ITEM = "gpx_item"; + public static final String POINT_TYPE_WORLD_REGION_SHOW_ON_MAP = "world_region_show_on_map"; public static final PointDescription LOCATION_POINT = new PointDescription(POINT_TYPE_LOCATION, ""); @@ -149,6 +150,10 @@ public class PointDescription { } } + public boolean contextMenuDisabled() { + return POINT_TYPE_WORLD_REGION_SHOW_ON_MAP.equals(type); + } + public boolean isLocation() { return POINT_TYPE_LOCATION.equals(type); } diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 171613109d..b50e0c22a1 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -550,7 +550,7 @@ public class MapActivity extends AccessibleActivity implements DownloadEvents { if (dashboardOnMap.isVisible()) { dashboardOnMap.hideDashboard(); } - if (mapLabelToShow != null) { + if (mapLabelToShow != null && !mapLabelToShow.contextMenuDisabled()) { mapContextMenu.setMapCenter(latLonToShow); mapContextMenu.setMapPosition(mapView.getMapPosition()); mapContextMenu.show(latLonToShow, mapLabelToShow, toShow); diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index 0ed424bd63..0c57c72f8d 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -31,6 +31,7 @@ import net.osmand.IProgress; import net.osmand.PlatformUtil; import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; +import net.osmand.data.PointDescription; import net.osmand.map.WorldRegion; import net.osmand.map.WorldRegion.RegionParams; import net.osmand.plus.OsmandApplication; @@ -793,7 +794,12 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl @Override public void onClick(View v) { OsmandApplication app = (OsmandApplication) getActivity().getApplication(); - app.getSettings().setMapLocationToShow(regionCenter.getLatitude(), regionCenter.getLongitude(), 5, null); + app.getSettings().setMapLocationToShow( + regionCenter.getLatitude(), + regionCenter.getLongitude(), + 5, + new PointDescription(PointDescription.POINT_TYPE_WORLD_REGION_SHOW_ON_MAP, "")); + dismiss(); MapActivity.launchMapActivityMoveToTop(getActivity()); }