diff --git a/map/routing_manager.cpp b/map/routing_manager.cpp index 670e806010..3017107a99 100644 --- a/map/routing_manager.cpp +++ b/map/routing_manager.cpp @@ -977,9 +977,9 @@ void RoutingManager::SetDrapeEngine(ref_ptr engine, bool is3dAl symbols.push_back(typePair.second + "-l"); } m_drapeEngine.SafeCall(&df::DrapeEngine::RequestSymbolsSize, symbols, - [this](std::vector const & sizes) + [this, is3dAllowed](std::vector const & sizes) { - GetPlatform().RunTask(Platform::Thread::Gui, [this, sizes]() + GetPlatform().RunTask(Platform::Thread::Gui, [this, is3dAllowed, sizes]() { auto it = kTransitSymbols.begin(); for (size_t i = 0; i < sizes.size(); i += 3) @@ -989,16 +989,16 @@ void RoutingManager::SetDrapeEngine(ref_ptr engine, bool is3dAl m_transitSymbolSizes[it->second + "-l"] = sizes[i + 2]; ++it; } + + // In case of the engine reinitialization recover route. + if (IsRoutingActive()) + { + InsertRoute(*m_routingSession.GetRoute()); + if (is3dAllowed && m_routingSession.IsFollowing()) + m_drapeEngine.SafeCall(&df::DrapeEngine::EnablePerspective); + } }); }); - - // In case of the engine reinitialization recover route. - if (IsRoutingActive()) - { - InsertRoute(*m_routingSession.GetRoute()); - if (is3dAllowed && m_routingSession.IsFollowing()) - m_drapeEngine.SafeCall(&df::DrapeEngine::EnablePerspective); - } } bool RoutingManager::HasRouteAltitude() const