| 559 | } |
| 560 | |
| 561 | void RoutingManager::RemoveRoute(bool deactivateFollowing) |
| 562 | { |
| 563 | GetPlatform().RunTask(Platform::Thread::Gui, [this, deactivateFollowing]() |
| 564 | { |
| 565 | { |
| 566 | auto es = m_bmManager->GetEditSession(); |
| 567 | es.ClearGroup(UserMark::Type::TRANSIT); |
| 568 | es.ClearGroup(UserMark::Type::SPEED_CAM); |
| 569 | es.ClearGroup(UserMark::Type::TRAFFIC_LIGHT); |
| 570 | es.ClearGroup(UserMark::Type::ROAD_WARNING); |
| 571 | } |
| 572 | if (deactivateFollowing) |
| 573 | SetPointsFollowingMode(false /* enabled */); |
| 574 | }); |
| 575 | |
| 576 | RemovePassedPoints(); |
| 577 | |
| 578 | if (deactivateFollowing) |
| 579 | { |
| 580 | m_transitReadManager->BlockTransitSchemeMode(false /* isBlocked */); |
| 581 | // Remove all subroutes. |
| 582 | m_drapeEngine.SafeCall(&df::DrapeEngine::RemoveSubroute, dp::DrapeID(), true /* deactivateFollowing */); |
| 583 | } |
| 584 | else |
| 585 | { |
| 586 | df::DrapeEngineLockGuard lock(m_drapeEngine); |
| 587 | if (lock) |
| 588 | { |
| 589 | lock_guard<mutex> lockSubroutes(m_drapeSubroutesMutex); |
| 590 | for (auto const & subrouteId : m_drapeSubroutes) |
| 591 | lock.Get()->RemoveSubroute(subrouteId, false /* deactivateFollowing */); |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | { |
| 596 | lock_guard<mutex> lock(m_drapeSubroutesMutex); |
| 597 | m_drapeSubroutes.clear(); |
| 598 | m_transitRouteInfo = TransitRouteInfo(); |
| 599 | } |
| 600 | } |
| 601 | |
| 602 | void RoutingManager::CollectFeaturesAlongRoute(vector<RouteSegment> const & segments, |
| 603 | m2::PointD const & startPt, |
no test coverage detected