mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-22 11:03:58 +00:00
@@ -156,9 +156,6 @@ void DrawWidget::PrepareShutdown()
|
||||
if (routingManager.IsRoutingActive() && routingManager.IsRoutingFollowing())
|
||||
{
|
||||
routingManager.SaveRoutePoints();
|
||||
|
||||
auto style = m_framework.GetMapStyle();
|
||||
m_framework.MarkMapStyle(MapStyleIsDark(style) ? MapStyle::MapStyleDefaultDark : MapStyle::MapStyleDefaultLight);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -507,11 +504,6 @@ void DrawWidget::OnLocationUpdate(location::GpsInfo const & info)
|
||||
m_framework.OnLocationUpdate(info);
|
||||
}
|
||||
|
||||
void DrawWidget::SetMapStyle(MapStyle mapStyle)
|
||||
{
|
||||
m_framework.SetMapStyle(mapStyle);
|
||||
}
|
||||
|
||||
void DrawWidget::SubmitFakeLocationPoint(m2::PointD const & pt)
|
||||
{
|
||||
m_emulatingLocation = true;
|
||||
@@ -625,7 +617,7 @@ void DrawWidget::FollowRoute()
|
||||
if (routingManager.IsRoutingActive() && !routingManager.IsRoutingFollowing())
|
||||
{
|
||||
routingManager.FollowRoute();
|
||||
SetMapStyleToVehicle();
|
||||
m_framework.SwitchToUsingVehicleStyle(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -637,7 +629,7 @@ void DrawWidget::ClearRoute()
|
||||
routingManager.CloseRouting(true /* remove route points */);
|
||||
|
||||
if (wasActive)
|
||||
SetMapStyleToDefault();
|
||||
m_framework.SwitchToUsingVehicleStyle(false);
|
||||
|
||||
m_turnsVisualizer.ClearTurns(m_framework.GetDrapeApi());
|
||||
}
|
||||
@@ -742,20 +734,7 @@ void DrawWidget::RefreshDrawingRules()
|
||||
|
||||
void DrawWidget::SetMapStyleToDefault()
|
||||
{
|
||||
auto const style = m_framework.GetMapStyle();
|
||||
SetMapStyle(MapStyleIsDark(style) ? MapStyle::MapStyleDefaultDark : MapStyle::MapStyleDefaultLight);
|
||||
}
|
||||
|
||||
void DrawWidget::SetMapStyleToVehicle()
|
||||
{
|
||||
auto const style = m_framework.GetMapStyle();
|
||||
SetMapStyle(MapStyleIsDark(style) ? MapStyle::MapStyleVehicleDark : MapStyle::MapStyleVehicleLight);
|
||||
}
|
||||
|
||||
void DrawWidget::SetMapStyleToOutdoors()
|
||||
{
|
||||
auto const style = m_framework.GetMapStyle();
|
||||
SetMapStyle(MapStyleIsDark(style) ? MapStyle::MapStyleOutdoorsDark : MapStyle::MapStyleOutdoorsLight);
|
||||
m_framework.SwitchToMapMode(MapMode::DEFAULT);
|
||||
}
|
||||
|
||||
m2::PointD DrawWidget::P2G(m2::PointD const & pt) const
|
||||
|
||||
Reference in New Issue
Block a user