From 42da5aabce068737d5affe2e3df0d4ed2514c85f Mon Sep 17 00:00:00 2001 From: Chumva Date: Wed, 20 Mar 2019 15:42:48 +0200 Subject: [PATCH] Add check for changing route calculation in progress --- .../plus/routepreparationmenu/MapRouteInfoMenu.java | 11 ++++++----- OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java index 19eee30489..84879a33cd 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java @@ -405,11 +405,12 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener OsmandApplication app = getApp(); if (app != null && fragmentRef != null && fragment.isVisible()) { boolean routeCalculating = app.getRoutingHelper().isRouteBeingCalculated() || app.getTransportRoutingHelper().isRouteBeingCalculated(); - setRouteCalculationInProgress(routeCalculating); - fragment.hideRouteCalculationProgressBar(); - fragment.updateControlButtons(); - fragment.updateInfo(); - if (!menuCards.isEmpty() && currentMenuState == MenuState.HEADER_ONLY) { + if (setRouteCalculationInProgress(routeCalculating)) { + if (!routeCalculationInProgress) { + fragment.hideRouteCalculationProgressBar(); + } + fragment.updateControlButtons(); + fragment.updateInfo(); fragment.openMenuHalfScreen(); } } diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 6a0f46a52e..c17aedc47c 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -1,12 +1,12 @@ package net.osmand.plus.routing; +import net.osmand.GPXUtilities.GPXFile; import net.osmand.Location; import net.osmand.PlatformUtil; import net.osmand.ValueHolder; import net.osmand.data.LatLon; import net.osmand.plus.ApplicationMode; -import net.osmand.GPXUtilities.GPXFile; import net.osmand.plus.NavigationService; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication;