From 51dfaeb44f9211cc270cb0416bb2e6f7fde9f0cf Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Mon, 18 Apr 2016 13:24:48 +0300 Subject: [PATCH] [bicycle routing] Switching on/off bicycle routing with ?bicycle flag in qt app. --- qt/search_panel.cpp | 7 +++++-- 1 file 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;