forked from organicmaps/organicmaps
[bicycle routing] Switching on/off bicycle routing with ?bicycle flag in qt app.
This commit is contained in:
parent
28c1ff751c
commit
51dfaeb44f
1 changed files with 5 additions and 2 deletions
|
@ -177,14 +177,17 @@ bool SearchPanel::TryChangeRouterCmd(QString const & str)
|
|||
{
|
||||
bool const isPedestrian = (str == "?pedestrian");
|
||||
bool const isVehicle = isPedestrian ? false : (str == "?vehicle");
|
||||
bool const isBicycle = isPedestrian || isVehicle ? false : (str == "?bicycle");
|
||||
|
||||
if (!isPedestrian && !isVehicle)
|
||||
if (!isPedestrian && !isVehicle && !isBicycle)
|
||||
return false;
|
||||
|
||||
m_pEditor->setText("");
|
||||
parentWidget()->hide();
|
||||
|
||||
routing::RouterType const routerType = isPedestrian ? routing::RouterType::Pedestrian : routing::RouterType::Vehicle;
|
||||
routing::RouterType const routerType = isPedestrian ? routing::RouterType::Pedestrian :
|
||||
isVehicle ? routing::RouterType::Vehicle :
|
||||
routing::RouterType::Bicycle;
|
||||
m_pDrawWidget->SetRouter(routerType);
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue