diff --git a/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java index 492cf7f439..c89547628d 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java @@ -17,12 +17,9 @@ import net.osmand.plus.activities.MapActivityLayers; import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin.OnMapSelectedCallback; import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin.RasterMapType; -import net.osmand.plus.views.GPXLayer; -import net.osmand.plus.views.RouteLayer; public class RasterMapMenu { private static final String TAG = "RasterMapMenu"; - public static ContextMenuAdapter createListAdapter(final MapActivity mapActivity, final RasterMapType type) { ContextMenuAdapter adapter = new ContextMenuAdapter(); @@ -122,6 +119,7 @@ public class RasterMapMenu { mapLayers.getMapControlsLayer().showTransparencyBar(mapTransparencyPreference, true); } else // if(settings.LAYER_TRANSPARENCY_SEEKBAR_MODE.get() == currentMapTypeSeekbarMode) { + settings.LAYER_TRANSPARENCY_SEEKBAR_MODE.set(LayerTransparencySeekbarMode.OFF); mapLayers.getMapControlsLayer().hideTransparencyBar(); } } diff --git a/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java b/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java index a4772cbd18..ef260a2fe7 100644 --- a/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/rastermaps/OsmandRasterMapsPlugin.java @@ -146,7 +146,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin { } if(settings.LAYER_TRANSPARENCY_SEEKBAR_MODE.get() == LayerTransparencySeekbarMode.UNDERLAY && underlayLayer.getMap() != null) { - layers.getMapControlsLayer().showTransparencyBar(settings.MAP_UNDERLAY, true); + layers.getMapControlsLayer().showTransparencyBar(settings.MAP_TRANSPARENCY, true); } else if(settings.LAYER_TRANSPARENCY_SEEKBAR_MODE.get() == LayerTransparencySeekbarMode.OVERLAY && overlayLayer.getMap() != null) { layers.getMapControlsLayer().showTransparencyBar(settings.MAP_OVERLAY_TRANSPARENCY, true); @@ -317,7 +317,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin { hidePolygonsPref.set(hasUnderlayDescription); RasterMapMenu.refreshMapComplete(mapActivity); } - }, isChecked); + }); return false; } return true; @@ -572,10 +572,11 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin { @NonNull RasterMapType type, @Nullable OnMapSelectedCallback callback) { OsmandMapTileView mapView = mapActivity.getMapView(); + CommonPreference mapTypePreference; CommonPreference exMapTypePreference; OsmandSettings.CommonPreference mapTransparencyPreference; - boolean isMapSelected; + //boolean isMapSelected; MapTileLayer layer; if (type == RasterMapType.OVERLAY) { mapTypePreference = settings.MAP_OVERLAY; @@ -589,9 +590,10 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin { } MapActivityLayers mapLayers = mapActivity.getMapLayers(); ITileSource map = layer.getMap(); - final OsmandSettings.LayerTransparencySeekbarMode currentMapTypeSeekbarMode = - OsmandRasterMapsPlugin.RasterMapType.OVERLAY ? - OsmandSettings.LayerTransparencySeekbarMode.OVERLAY : OsmandSettings.LayerTransparencySeekbarMode.UNDERLAY; + final OsmandSettings.LayerTransparencySeekbarMode currentMapTypeSeekbarMode = type == + OsmandRasterMapsPlugin.RasterMapType.OVERLAY + ? OsmandSettings.LayerTransparencySeekbarMode.OVERLAY + : OsmandSettings.LayerTransparencySeekbarMode.UNDERLAY; if (map != null) { mapTypePreference.set(null); if (callback != null) { @@ -605,15 +607,10 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin { } } else { settings.LAYER_TRANSPARENCY_SEEKBAR_MODE.set(currentMapTypeSeekbarMode); - selectMapOverlayLayer(mapView, mapTypePreference, exMapTypePreference, false, mapActivity, callback); - showSeekbar = true; - } - } - public enum RasterMapType { OVERLAY, UNDERLAY