From bd97cb4ceb5796ea046b7bdc82d8f01b3b9c1031 Mon Sep 17 00:00:00 2001 From: Alexander Borsuk Date: Fri, 15 Aug 2025 20:38:14 +0300 Subject: [PATCH] Do not autozoom to show the full route when adding stops This should simplify route planning and avoid unnecessary zoom in back and back again Signed-off-by: Alexander Borsuk --- libs/map/routing_manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/map/routing_manager.cpp b/libs/map/routing_manager.cpp index b40e65f53..65c2753e0 100644 --- a/libs/map/routing_manager.cpp +++ b/libs/map/routing_manager.cpp @@ -408,7 +408,8 @@ void RoutingManager::OnBuildRouteReady(Route const & route, RouterResultCode cod // Validate route (in case of bicycle routing it can be invalid). ASSERT(route.IsValid(), ()); - if (route.IsValid() && m_currentRouterType != routing::RouterType::Ruler) + // Do not show the full route if one or more stops were added, for easier multi-stop trip planning. + if (route.IsValid() && route.GetSubrouteCount() < 2 && m_currentRouterType != routing::RouterType::Ruler) { m2::RectD routeRect = route.GetPoly().GetLimitRect(); routeRect.Scale(kRouteScaleMultiplier);