Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/map
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2017-08-08 18:37:31 +0300
committerDaria Volvenkova <d.volvenkova@corp.mail.ru>2017-08-09 19:55:50 +0300
commit553f20f7cac24f81a15b2a13c5275628f5a85223 (patch)
tree127ba380764ce6f002fdb297ed6e1df40d1e7edd /map
parentfd90008fafda5ba329c096e0fff28ba0fa8d79f0 (diff)
Added sub route color maskingbeta-958
Diffstat (limited to 'map')
-rw-r--r--map/routing_manager.cpp4
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: