diff --git a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java index 658fccd744..4f5e07808f 100644 --- a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java +++ b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java @@ -77,7 +77,9 @@ public class RoutePointsActivity extends OsmandListActivity { app.getSelectedGpxHelper().setGpxFileToDisplay(gpx); plugin.setCurrentRoute(gpx); SelectedRouteGpxFile sgpx = plugin.getCurrentRoute(); - sgpx.naviateToNextPoint(); + if (!sgpx.getCurrentPoints().get(0).isNextNavigate){ + sgpx.naviateToNextPoint(); + } prepareView(); return false; } @@ -265,6 +267,7 @@ public class RoutePointsActivity extends OsmandListActivity { if (menuItem.getItemId() == MARK_AS_CURRENT_ID) { plugin.getCurrentRoute().navigateToPoint(rp); saveGPXAsync(); + prepareView(); } else if (menuItem.getItemId() == POI_ON_MAP_ID) { LatLon point = rp.getPoint(); app.getSettings().setMapLocationToShow(point.getLatitude(), point.getLongitude(), @@ -274,6 +277,7 @@ public class RoutePointsActivity extends OsmandListActivity { // inverts selection state of item plugin.getCurrentRoute().markPoint(rp, !rp.isVisited()); saveGPXAsync(); + prepareView(); } actionMode.finish(); return true; diff --git a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java index b4ff71a7c1..77a40a4d7b 100644 --- a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java @@ -135,7 +135,7 @@ public class RoutePointsPlugin extends OsmandPlugin { } }); routeStepsControl.setText(null, null); - routeStepsControl.setImageDrawable(map.getResources().getDrawable(R.drawable.widget_parking)); + routeStepsControl.setImageDrawable(map.getResources().getDrawable(R.drawable.widget_target)); return routeStepsControl; } @@ -213,7 +213,7 @@ public class RoutePointsPlugin extends OsmandPlugin { public int getVisitedCount() { int k = 0; for(RoutePoint rp : currentPoints) { - if(!rp.isVisited()) { + if(rp.isVisited()) { k++; } } @@ -300,6 +300,7 @@ public class RoutePointsPlugin extends OsmandPlugin { WptPt wptPt = rt.points.get(i); RoutePoint rtp = new RoutePoint(); rtp.gpxOrder = i; + rtp.wpt = wptPt; String time = wptPt.getExtensionsToRead().get(VISITED_KEY); try { rtp.visitedTime = Long.parseLong(time); @@ -309,7 +310,7 @@ public class RoutePointsPlugin extends OsmandPlugin { if(rtp.isNextNavigate) { locName = null; } - + currentPoints.add(rtp); } sortPoints(); }