forked from organicmaps/organicmaps
[android] return to planing state from navigating state if add/remove stop
This commit is contained in:
parent
ee7d73996b
commit
8fadbd96f8
1 changed files with 19 additions and 0 deletions
|
@ -442,6 +442,8 @@ public class RoutingController implements TaxiManager.TaxiListener
|
|||
build();
|
||||
if (mContainer != null)
|
||||
mContainer.onAddedStop();
|
||||
|
||||
backToPlaningStateIfNavigating();
|
||||
}
|
||||
|
||||
public void removeStop(@NonNull MapObject mapObject)
|
||||
|
@ -458,6 +460,23 @@ public class RoutingController implements TaxiManager.TaxiListener
|
|||
build();
|
||||
if (mContainer != null)
|
||||
mContainer.onRemovedStop();
|
||||
|
||||
backToPlaningStateIfNavigating();
|
||||
}
|
||||
|
||||
private void backToPlaningStateIfNavigating()
|
||||
{
|
||||
if (!isNavigating())
|
||||
return;
|
||||
|
||||
setState(State.PREPARE);
|
||||
if (mContainer != null)
|
||||
{
|
||||
mContainer.showNavigation(false);
|
||||
mContainer.showRoutePlan(true, null);
|
||||
mContainer.updateMenu();
|
||||
mContainer.onNavigationCancelled();
|
||||
}
|
||||
}
|
||||
|
||||
public void removeIntermediatePoints()
|
||||
|
|
Loading…
Add table
Reference in a new issue