mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-22 14:13:45 +00:00
[routing] Remove passed intermediate points when assembling a modified route mid-navigation
Fixes OM #9592 Signed-off-by: Michał Brzozowski <www.haxor@gmail.com>
This commit is contained in:
@@ -328,7 +328,6 @@ RoutingManager::RoutingManager(Callbacks && callbacks, Delegate & delegate)
|
||||
nullptr
|
||||
#endif
|
||||
);
|
||||
|
||||
m_routingSession.SetRoutingCallbacks(
|
||||
[this](Route const & route, RouterResultCode code) { OnBuildRouteReady(route, code); },
|
||||
[this](Route const & route, RouterResultCode code) { OnRebuildRouteReady(route, code); },
|
||||
@@ -554,8 +553,10 @@ void RoutingManager::RemoveRoute(bool deactivateFollowing)
|
||||
es.ClearGroup(UserMark::Type::SPEED_CAM);
|
||||
es.ClearGroup(UserMark::Type::ROAD_WARNING);
|
||||
}
|
||||
if (deactivateFollowing)
|
||||
SetPointsFollowingMode(false /* enabled */);
|
||||
if (deactivateFollowing) {
|
||||
SetPointsFollowingMode(false /* enabled */);
|
||||
RemovePassedPoints();
|
||||
}
|
||||
});
|
||||
|
||||
if (deactivateFollowing)
|
||||
@@ -954,6 +955,13 @@ void RoutingManager::SetPointsFollowingMode(bool enabled)
|
||||
routePoints.SetFollowingMode(enabled);
|
||||
}
|
||||
|
||||
void RoutingManager::RemovePassedPoints()
|
||||
{
|
||||
ASSERT(m_bmManager != nullptr, ());
|
||||
RoutePointsLayout routePoints(*m_bmManager);
|
||||
routePoints.RemovePassedPoints();
|
||||
}
|
||||
|
||||
void RoutingManager::ReorderIntermediatePoints()
|
||||
{
|
||||
vector<RouteMarkPoint *> prevPoints;
|
||||
|
||||
Reference in New Issue
Block a user