This commit is contained in:
Alex Sytnyk 2018-07-24 18:04:17 +03:00
parent 67a2d9b1eb
commit d4238993ad
2 changed files with 9 additions and 1 deletions

View file

@ -1734,6 +1734,11 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
@Override
public void newRouteIsCalculated(boolean newRoute, ValueHolder<Boolean> showToast) {
MapRouteInfoMenu routeInfoMenu = mapLayers.getMapControlsLayer().getMapRouteInfoMenu();
if (routeInfoMenu.isSelectFromMapTouch()) {
return;
}
RoutingHelper rh = app.getRoutingHelper();
if (newRoute && rh.isRoutePlanningMode() && mapView != null) {
Location lt = rh.getLastProjection();
@ -1762,7 +1767,6 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
int tileBoxWidthPx = 0;
int tileBoxHeightPx = 0;
MapRouteInfoMenu routeInfoMenu = mapLayers.getMapControlsLayer().getMapRouteInfoMenu();
WeakReference<MapRouteInfoMenuFragment> fragmentRef = routeInfoMenu.findMenuFragment();
if (fragmentRef != null) {
MapRouteInfoMenuFragment f = fragmentRef.get();

View file

@ -123,6 +123,10 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
this.onDismissListener = onDismissListener;
}
public boolean isSelectFromMapTouch() {
return selectFromMapTouch;
}
public void cancelSelectionFromMap() {
selectFromMapTouch = false;
}