mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53:36 +00:00
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:
committed by
Konstantin Pastbin
parent
dd2458d1b1
commit
bd97cb4ceb
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user