From ec80872974bd3a81c902d34137e0c03847fdf322 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Wed, 22 Nov 2017 18:33:13 +0200 Subject: [PATCH] Remove icon from parameters --- .../src/net/osmand/plus/mapcontextmenu/MenuController.java | 2 +- .../controllers/FavouritePointMenuController.java | 2 +- .../mapcontextmenu/controllers/MapMarkerMenuController.java | 6 +++--- .../mapcontextmenu/controllers/WptPtMenuController.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java index e7aa82332b..63b4c05240 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java @@ -436,7 +436,7 @@ public abstract class MenuController extends BaseMenuController { return true; } - protected Drawable getShowOnTopBarIcon() { + public Drawable getShowOnTopBarIcon() { if (showOnTopBarIcon == null) { IconsCache ic = getMapActivity().getMyApplication().getIconsCache(); Drawable background = ic.getIcon(R.drawable.ic_action_device_top, diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java index e5f352735f..aab6b6b0f1 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/FavouritePointMenuController.java @@ -33,7 +33,7 @@ public class FavouritePointMenuController extends MenuController { final MapMarker mapMarker = markersHelper.getMapMarker(fav); if (mapMarker != null) { - MapMarkerMenuController.createMarkerButtons(this, mapActivity, mapMarker, getShowOnTopBarIcon()); + MapMarkerMenuController.createMarkerButtons(this, mapActivity, mapMarker); } } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapMarkerMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapMarkerMenuController.java index 3fc86aa0eb..4a07a96155 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapMarkerMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/MapMarkerMenuController.java @@ -22,7 +22,7 @@ public class MapMarkerMenuController extends MenuController { super(new MenuBuilder(mapActivity), pointDescription, mapActivity); this.mapMarker = mapMarker; builder.setShowNearestWiki(true); - createMarkerButtons(this, mapActivity, mapMarker, getShowOnTopBarIcon()); + createMarkerButtons(this, mapActivity, mapMarker); } @Override @@ -76,7 +76,7 @@ public class MapMarkerMenuController extends MenuController { return R.string.rename_marker; } - public static void createMarkerButtons(MenuController menuController, final MapActivity mapActivity, final MapMarker mapMarker, Drawable leftIcon) { + public static void createMarkerButtons(MenuController menuController, final MapActivity mapActivity, final MapMarker mapMarker) { final MapMarkersHelper markersHelper = mapActivity.getMyApplication().getMapMarkersHelper(); TitleButtonController leftTitleButtonController = menuController.new TitleButtonController() { @@ -99,7 +99,7 @@ public class MapMarkerMenuController extends MenuController { } }; leftSubtitleButtonController.caption = mapActivity.getString(R.string.show_on_top_bar); - leftSubtitleButtonController.leftIcon = leftIcon; + leftSubtitleButtonController.leftIcon = menuController.getShowOnTopBarIcon(); menuController.setLeftSubtitleButtonController(leftSubtitleButtonController); } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/WptPtMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/WptPtMenuController.java index 016ea7a9c5..73c82ab902 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/WptPtMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/WptPtMenuController.java @@ -28,7 +28,7 @@ public class WptPtMenuController extends MenuController { final MapMarker mapMarker = markersHelper.getMapMarker(wpt); if (mapMarker != null) { - MapMarkerMenuController.createMarkerButtons(this, mapActivity, mapMarker, getShowOnTopBarIcon()); + MapMarkerMenuController.createMarkerButtons(this, mapActivity, mapMarker); } }