mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +00:00
[map] Show track's place page screen on save route automatically
It will help the user to save the track to the right place, set color and name without searching for the track in the bookmarks screen. Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
1cf4ff21ec
commit
21cc2bbf52
@@ -1775,7 +1775,8 @@ bool Framework::IsTrackRecordingEnabled() const
|
||||
|
||||
void Framework::SaveRoute()
|
||||
{
|
||||
m_routingManager.SaveRoute();
|
||||
auto const trackId = m_routingManager.SaveRoute();
|
||||
ShowTrack(trackId);
|
||||
}
|
||||
|
||||
void Framework::OnUpdateGpsTrackPointsCallback(vector<pair<size_t, location::GpsInfo>> && toAdd,
|
||||
|
||||
@@ -1098,7 +1098,7 @@ static std::string GetNameFromPoint(RouteMarkData const & rmd)
|
||||
return rmd.m_title;
|
||||
}
|
||||
|
||||
void RoutingManager::SaveRoute()
|
||||
kml::TrackId RoutingManager::SaveRoute()
|
||||
{
|
||||
auto points = GetRoutePolyline().GetPolyline().GetPoints();
|
||||
auto const routePoints = GetRoutePoints();
|
||||
@@ -1109,7 +1109,7 @@ void RoutingManager::SaveRoute()
|
||||
std::unique(points.begin(), points.end(), [](const m2::PointD & p1, const m2::PointD & p2) { return AlmostEqualAbs(p1, p2, kMwmPointAccuracy); }),
|
||||
points.end());
|
||||
|
||||
m_bmManager->SaveRoute(points, from, to);
|
||||
return m_bmManager->SaveRoute(points, from, to);
|
||||
}
|
||||
|
||||
bool RoutingManager::DisableFollowMode()
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
// This method was added because we do not want to break the behaviour that is familiar to our
|
||||
// users.
|
||||
bool DisableFollowMode();
|
||||
void SaveRoute();
|
||||
kml::TrackId SaveRoute();
|
||||
|
||||
void SetRouteBuildingListener(RouteBuildingCallback const & buildingCallback)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user