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 <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-08-15 20:38:14 +03:00
committed by Konstantin Pastbin
parent dd2458d1b1
commit bd97cb4ceb

View File

@@ -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);