Disabled zoom after route is built

Signed-off-by: S. Kozyr <s.trump@gmail.com>
This commit is contained in:
Sergiy Kozyr 2023-11-21 11:53:07 +02:00
parent 2a98e6501a
commit 2888a41ddf
Signed by: strump
GPG key ID: C622E5563CAC205D

View file

@ -412,14 +412,14 @@ 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)
{
m2::RectD routeRect = route.GetPoly().GetLimitRect();
routeRect.Scale(kRouteScaleMultiplier);
m_drapeEngine.SafeCall(&df::DrapeEngine::SetModelViewRect, routeRect,
true /* applyRotation */, -1 /* zoom */, true /* isAnim */,
true /* useVisibleViewport */);
}
//if (route.IsValid() && m_currentRouterType != routing::RouterType::Ruler)
//{
//m2::RectD routeRect = route.GetPoly().GetLimitRect();
//routeRect.Scale(kRouteScaleMultiplier); // TODO: Disable zoom
//m_drapeEngine.SafeCall(&df::DrapeEngine::SetModelViewRect, routeRect,
// true /* applyRotation */, -1 /* zoom */, true /* isAnim */,
// true /* useVisibleViewport */);
//}
CallRouteBuilded(hasWarnings ? RouterResultCode::HasWarnings : code, storage::CountriesSet());
}