diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java index ca8e8b7ccd..a6d14121b6 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java @@ -419,7 +419,10 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL } public boolean navigateInPedestrianMode() { - return menuController instanceof ParkingPositionMenuController; + if (menuController != null) { + return menuController.navigateInPedestrianMode(); + } + return false; } public boolean close() { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java index 68dc0567b7..a124d885d8 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java @@ -403,6 +403,10 @@ public abstract class MenuController extends BaseMenuController { return null; } + public boolean navigateInPedestrianMode() { + return false; + } + public int getFavActionIconId() { return R.drawable.map_action_fav_dark; } diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java index 18e8a2d07e..b107f77e7a 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/TransportRouteController.java @@ -80,6 +80,11 @@ public class TransportRouteController extends MenuController { } } + @Override + public boolean navigateInPedestrianMode() { + return true; + } + @Override protected Object getObject() { return transportRoute; @@ -102,11 +107,6 @@ public class TransportRouteController extends MenuController { return false; } - @Override - public boolean navigateButtonVisible() { - return false; - } - @Override public boolean isClosable() { return false; diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionMenuController.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionMenuController.java index 17767ba6cd..61badd42bb 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionMenuController.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionMenuController.java @@ -83,6 +83,11 @@ public class ParkingPositionMenuController extends MenuController { return parkingTitle; } + @Override + public boolean navigateInPedestrianMode() { + return true; + } + @Override public boolean displayDistanceDirection() { return true;