diff --git a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsLayer.java b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsLayer.java index 360826efe4..6852c49b34 100644 --- a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsLayer.java +++ b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsLayer.java @@ -80,6 +80,7 @@ public class RoutePointsLayer extends OsmandMapLayer implements ContextMenuLaye } else if (itemId == R.string.mark_as_visited) { plugin.getCurrentRoute().markPoint(point, true); } else if (itemId == R.string.mark_as_current){ + plugin.getCurrentRoute().markPoint(point, false); plugin.getCurrentRoute().navigateToPoint(point); } else if (itemId == R.string.navigate_to_next){ plugin.getCurrentRoute().naviateToNextPoint(); @@ -89,10 +90,10 @@ public class RoutePointsLayer extends OsmandMapLayer implements ContextMenuLaye if (plugin.getCurrentRoute().getPointStatus(point)){ adapter.item(R.string.mark_as_not_visited).icons( - R.drawable.ic_action_ok_dark, R.drawable.ic_action_ok_light).listen(listener).reg(); + R.drawable.ic_action_gremove_dark, R.drawable.ic_action_gremove_light).listen(listener).reg(); } else { adapter.item(R.string.mark_as_visited).icons( - R.drawable.ic_action_gremove_dark, R.drawable.ic_action_gremove_light).listen(listener).reg(); + R.drawable.ic_action_ok_dark, R.drawable.ic_action_ok_light).listen(listener).reg(); } RoutePointsPlugin.RoutePoint routePoint = plugin.getCurrentRoute().getRoutePointFromWpt(point); diff --git a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java index 0544e23ca2..1f9d44af5d 100644 --- a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java @@ -119,6 +119,10 @@ public class RoutePointsPlugin extends OsmandPlugin { @Override public void updateLayers(OsmandMapTileView mapView, MapActivity activity) { + if (routePointsLayer == null){ + registerLayers(activity); + } + if (routeStepsControl == null) { registerWidget(activity); } @@ -384,7 +388,6 @@ public class RoutePointsPlugin extends OsmandPlugin { RoutePoint routePoint = getRoutePointFromWpt(point); if (routePoint != null) { navigateToPoint(routePoint); - } }