forked from organicmaps/organicmaps
[ios] Fixed pedestrian mode activation/deactivation.
This commit is contained in:
parent
4bb29cc1b0
commit
3e34bd762b
1 changed files with 5 additions and 3 deletions
|
@ -390,12 +390,14 @@ static BOOL keyboardLoaded = NO;
|
|||
|
||||
- (BOOL)tryToChangeRoutingModeCmd:(NSString *)cmd
|
||||
{
|
||||
if (![cmd isEqual:@"?pedestrian"])
|
||||
BOOL const isPedestrian = [cmd isEqualToString:@"?pedestrian"];
|
||||
BOOL const isVehicle = [cmd isEqualToString:@"?vehicle"];
|
||||
|
||||
if (!isPedestrian && !isVehicle)
|
||||
return NO;
|
||||
|
||||
MapsAppDelegate * delegate = [MapsAppDelegate theApp];
|
||||
BOOL const isPedestrianRoutingMode = delegate.isPedestrianRoutingMode;
|
||||
delegate.isPedestrianRoutingMode = !isPedestrianRoutingMode;
|
||||
delegate.isPedestrianRoutingMode = isPedestrian;
|
||||
[self search:cmd];
|
||||
[self searchBarDidPressCancelButton:nil];
|
||||
return YES;
|
||||
|
|
Loading…
Add table
Reference in a new issue