From edd83f62e41b22eb2c3cae099c9f51fa4600e4dd Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Mon, 11 Jan 2016 19:10:27 +0300 Subject: [PATCH] Fix - In route preparation should be no passing intermediate point messages --- OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java | 8 ++++++-- .../views/controls/SwipeDismissListViewTouchListener.java | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 7f79fb4765..8c3110401d 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -454,7 +454,9 @@ public class RoutingHelper { } // 2. check if intermediate found - if(route.getIntermediatePointsToPass() > 0 && route.getDistanceToNextIntermediate(lastFixedLocation) < POSITION_TOLERANCE * 2) { + if(route.getIntermediatePointsToPass() > 0 + && route.getDistanceToNextIntermediate(lastFixedLocation) < POSITION_TOLERANCE * 2 + && !isRoutePlanningMode) { showMessage(app.getString(R.string.arrived_at_intermediate_point)); route.passIntermediatePoint(); TargetPointsHelper targets = app.getTargetPointsHelper(); @@ -485,7 +487,9 @@ public class RoutingHelper { // 3. check if destination found Location lastPoint = routeNodes.get(routeNodes.size() - 1); - if (currentRoute > routeNodes.size() - 3 && currentLocation.distanceTo(lastPoint) < (((float)settings.getApplicationMode().getArrivalDistance()) * settings.ARRIVAL_DISTANCE_FACTOR.get())) { + if (currentRoute > routeNodes.size() - 3 + && currentLocation.distanceTo(lastPoint) < (((float)settings.getApplicationMode().getArrivalDistance()) * settings.ARRIVAL_DISTANCE_FACTOR.get()) + && !isRoutePlanningMode) { showMessage(app.getString(R.string.arrived_at_destination)); TargetPointsHelper targets = app.getTargetPointsHelper(); TargetPoint tp = targets.getPointToNavigate(); diff --git a/OsmAnd/src/net/osmand/plus/views/controls/SwipeDismissListViewTouchListener.java b/OsmAnd/src/net/osmand/plus/views/controls/SwipeDismissListViewTouchListener.java index 5da7ffa495..8aa5c84d42 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/SwipeDismissListViewTouchListener.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/SwipeDismissListViewTouchListener.java @@ -460,10 +460,10 @@ public class SwipeDismissListViewTouchListener implements View.OnTouchListener { undoable.discard(); } mUndoActions.clear(); - if (mCallbacks != null) { - mCallbacks.onHidePopup(); - } if (mUndoPopup.isShowing()) { + if (mCallbacks != null) { + mCallbacks.onHidePopup(); + } mUndoPopup.dismiss(); } }