diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-04-18 13:24:48 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-04-18 13:24:48 +0300 |
commit | 51dfaeb44f9211cc270cb0416bb2e6f7fde9f0cf (patch) | |
tree | 3419b59a29ec30ad02a31425180de0f78b7d2ea6 /qt | |
parent | 28c1ff751cb264062ff6e7163fdb79e8268e9cf6 (diff) |
[bicycle routing] Switching on/off bicycle routing with ?bicycle flag in qt app.
Diffstat (limited to 'qt')
-rw-r--r-- | qt/search_panel.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp index 347c65c853..94cef9dce4 100644 --- a/qt/search_panel.cpp +++ b/qt/search_panel.cpp @@ -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; |