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:
@@ -353,6 +353,16 @@ void RoutePointsLayout::SetFollowingMode(bool enabled)
|
||||
m_editSession.GetMarkForEdit<RouteMarkPoint>(markId)->SetFollowingMode(enabled);
|
||||
}
|
||||
|
||||
void RoutePointsLayout::RemovePassedPoints()
|
||||
{
|
||||
for (auto markId : m_manager.GetUserMarkIds(UserMark::Type::ROUTING)) {
|
||||
auto * mark = m_editSession.GetMarkForEdit<RouteMarkPoint>(markId);
|
||||
if (mark->IsPassed())
|
||||
m_editSession.DeleteUserMark(mark->GetId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RouteMarkPoint const * RoutePointsLayout::GetRoutePoint(RouteMarkType type, size_t intermediateIndex) const
|
||||
{
|
||||
for (auto markId : m_manager.GetUserMarkIds(UserMark::Type::ROUTING))
|
||||
|
||||
Reference in New Issue
Block a user