| 944 | } |
| 945 | |
| 946 | void RoutingManager::AddRoutePoint(RouteMarkData && markData, bool reorderIntermediatePoints) |
| 947 | { |
| 948 | ASSERT(m_bmManager != nullptr, ()); |
| 949 | RoutePointsLayout routePoints(*m_bmManager); |
| 950 | |
| 951 | // Always replace start and finish points. |
| 952 | if (markData.m_pointType == RouteMarkType::Start || markData.m_pointType == RouteMarkType::Finish) |
| 953 | routePoints.RemoveRoutePoint(markData.m_pointType); |
| 954 | |
| 955 | if (markData.m_isMyPosition) |
| 956 | { |
| 957 | RouteMarkPoint const * mark = routePoints.GetMyPositionPoint(); |
| 958 | if (mark != nullptr) |
| 959 | routePoints.RemoveRoutePoint(mark->GetRoutePointType(), mark->GetIntermediateIndex()); |
| 960 | } |
| 961 | |
| 962 | markData.m_isVisible = !markData.m_isMyPosition; |
| 963 | routePoints.AddRoutePoint(std::move(markData)); |
| 964 | |
| 965 | if (reorderIntermediatePoints) |
| 966 | ReorderIntermediatePoints(); |
| 967 | } |
| 968 | |
| 969 | void RoutingManager::ContinueRouteToPoint(RouteMarkData && markData) |
| 970 | { |
no test coverage detected