| 967 | } |
| 968 | |
| 969 | void RoutingManager::ContinueRouteToPoint(RouteMarkData && markData) |
| 970 | { |
| 971 | ASSERT(m_bmManager != nullptr, ()); |
| 972 | ASSERT(markData.m_pointType == RouteMarkType::Finish, ("New route point should have type RouteMarkType::Finish")); |
| 973 | RoutePointsLayout routePoints(*m_bmManager); |
| 974 | |
| 975 | // Finish point is now Intermediate point |
| 976 | RouteMarkPoint * finishMarkData = routePoints.GetRoutePointForEdit(RouteMarkType::Finish); |
| 977 | finishMarkData->SetRoutePointType(RouteMarkType::Intermediate); |
| 978 | finishMarkData->SetIntermediateIndex(routePoints.GetRoutePointsCount() - 2); |
| 979 | |
| 980 | if (markData.m_isMyPosition) |
| 981 | { |
| 982 | RouteMarkPoint const * mark = routePoints.GetMyPositionPoint(); |
| 983 | if (mark) |
| 984 | routePoints.RemoveRoutePoint(mark->GetRoutePointType(), mark->GetIntermediateIndex()); |
| 985 | } |
| 986 | |
| 987 | markData.m_intermediateIndex = routePoints.GetRoutePointsCount() - 1; |
| 988 | markData.m_isVisible = !markData.m_isMyPosition; |
| 989 | routePoints.AddRoutePoint(std::move(markData)); |
| 990 | } |
| 991 | |
| 992 | void RoutingManager::RemoveRoutePoint(RouteMarkType type, size_t intermediateIndex) |
| 993 | { |
no test coverage detected