From 0ba54fdb5d48c028fd4b7d6f9ca6c34a14cd2d3e Mon Sep 17 00:00:00 2001 From: Maxim Pimenov Date: Tue, 24 Dec 2019 16:53:22 +0300 Subject: [PATCH] [qt] [routing] Removed a temporary debugging command. The proper way to change the router is by pressing the routing button first. The button did not exist when this command was introduced. --- qt/search_panel.cpp | 23 ----------------------- qt/search_panel.hpp | 1 - 2 files changed, 24 deletions(-) diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp index dfef87e4db..e1b337c84e 100644 --- a/qt/search_panel.cpp +++ b/qt/search_panel.cpp @@ -134,27 +134,6 @@ void SearchPanel::OnSearchResults(uint64_t timestamp, search::Results const & re } } -// TODO: This code only for demonstration purposes and will be removed soon -bool SearchPanel::TryChangeRouterCmd(QString const & str) -{ - routing::RouterType routerType; - if (str == "?pedestrian") - routerType = routing::RouterType::Pedestrian; - else if (str == "?vehicle") - routerType = routing::RouterType::Vehicle; - else if (str == "?bicycle") - routerType = routing::RouterType::Bicycle; - else if (str == "?transit") - routerType = routing::RouterType::Transit; - else - return false; - - m_pEditor->setText(""); - parentWidget()->hide(); - m_pDrawWidget->SetRouter(routerType); - return true; -} - // TODO: This code only for demonstration purposes and will be removed soon bool SearchPanel::Try3dModeCmd(QString const & str) { @@ -213,8 +192,6 @@ void SearchPanel::OnSearchTextChanged(QString const & str) QString const normalized = str.normalized(QString::NormalizationForm_KC); // TODO: This code only for demonstration purposes and will be removed soon - if (TryChangeRouterCmd(normalized)) - return; if (Try3dModeCmd(normalized)) return; if (TryDisplacementModeCmd(normalized)) diff --git a/qt/search_panel.hpp b/qt/search_panel.hpp index 6f4bb93a01..1d6b31d07b 100644 --- a/qt/search_panel.hpp +++ b/qt/search_panel.hpp @@ -56,7 +56,6 @@ private slots: void OnAnimationTimer(); void OnClearButton(); - bool TryChangeRouterCmd(QString const & str); bool Try3dModeCmd(QString const & str); bool TryDisplacementModeCmd(QString const & str); bool TryTrafficSimplifiedColorsCmd(QString const & str);