mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-09 13:54:37 +00:00
[routing] Make 'auto reordering of intermediate stops' optional
Signed-off-by: Gonzalo Pesquero <gpesquero@yahoo.es>
This commit is contained in:
committed by
Konstantin Pastbin
parent
8b096035df
commit
5bb2569e76
@@ -841,7 +841,7 @@ bool RoutingManager::CouldAddIntermediatePoint() const
|
||||
< RoutePointsLayout::kMaxIntermediatePointsCount + 2;
|
||||
}
|
||||
|
||||
void RoutingManager::AddRoutePoint(RouteMarkData && markData)
|
||||
void RoutingManager::AddRoutePoint(RouteMarkData && markData, bool reorderIntermediatePoints)
|
||||
{
|
||||
ASSERT(m_bmManager != nullptr, ());
|
||||
RoutePointsLayout routePoints(*m_bmManager);
|
||||
@@ -859,7 +859,9 @@ void RoutingManager::AddRoutePoint(RouteMarkData && markData)
|
||||
|
||||
markData.m_isVisible = !markData.m_isMyPosition;
|
||||
routePoints.AddRoutePoint(std::move(markData));
|
||||
ReorderIntermediatePoints();
|
||||
|
||||
if (reorderIntermediatePoints)
|
||||
ReorderIntermediatePoints();
|
||||
}
|
||||
|
||||
void RoutingManager::ContinueRouteToPoint(RouteMarkData && markData)
|
||||
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
/// will not return previous data, only newer.
|
||||
void GenerateNotifications(std::vector<std::string> & notifications, bool announceStreets);
|
||||
|
||||
void AddRoutePoint(RouteMarkData && markData);
|
||||
void AddRoutePoint(RouteMarkData && markData, bool reorderIntermediatePoints = true);
|
||||
void ContinueRouteToPoint(RouteMarkData && markData);
|
||||
std::vector<RouteMarkData> GetRoutePoints() const;
|
||||
size_t GetRoutePointsCount() const;
|
||||
|
||||
Reference in New Issue
Block a user