diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-08-08 18:37:31 +0300 |
---|---|---|
committer | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2017-08-09 19:55:50 +0300 |
commit | 553f20f7cac24f81a15b2a13c5275628f5a85223 (patch) | |
tree | 127ba380764ce6f002fdb297ed6e1df40d1e7edd /map | |
parent | fd90008fafda5ba329c096e0fff28ba0fa8d79f0 (diff) |
Added sub route color maskingbeta-958
Diffstat (limited to 'map')
-rw-r--r-- | map/routing_manager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/map/routing_manager.cpp b/map/routing_manager.cpp index 1bc11104ed..debdc8b627 100644 --- a/map/routing_manager.cpp +++ b/map/routing_manager.cpp @@ -431,7 +431,8 @@ void RoutingManager::InsertRoute(Route const & route) std::vector<RouteSegment> segments; std::vector<m2::PointD> points; double distance = 0.0; - for (size_t subrouteIndex = route.GetCurrentSubrouteIdx(); subrouteIndex < route.GetSubrouteCount(); ++subrouteIndex) + auto const subroutesCount = route.GetSubrouteCount(); + for (size_t subrouteIndex = route.GetCurrentSubrouteIdx(); subrouteIndex < subroutesCount; ++subrouteIndex) { route.GetSubrouteInfo(subrouteIndex, segments); @@ -452,6 +453,7 @@ void RoutingManager::InsertRoute(Route const & route) auto subroute = make_unique_dp<df::Subroute>(); subroute->m_polyline = m2::PolylineD(points); subroute->m_baseDistance = currentBaseDistance; + subroute->m_baseDepthIndex = static_cast<double>(subroutesCount - subrouteIndex - 1); switch (m_currentRouterType) { case RouterType::Vehicle: |