Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/location.hpp1
-rw-r--r--routing/routing_session.cpp9
2 files changed, 9 insertions, 1 deletions
diff --git a/platform/location.hpp b/platform/location.hpp
index 6132896dd0..d57dbd083b 100644
--- a/platform/location.hpp
+++ b/platform/location.hpp
@@ -98,6 +98,7 @@ namespace location
public:
FollowingInfo()
: m_turn(routing::turns::TurnDirection::NoTurn),
+ m_nextTurn(routing::turns::TurnDirection::NoTurn),
m_exitNum(0),
m_time(0),
m_completionPercent(0),
diff --git a/routing/routing_session.cpp b/routing/routing_session.cpp
index 85ea2d175e..d4222444bc 100644
--- a/routing/routing_session.cpp
+++ b/routing/routing_session.cpp
@@ -241,13 +241,20 @@ void RoutingSession::GetRouteFollowingInfo(FollowingInfo & info) const
threads::MutexGuard guard(m_routeSessionMutex);
UNUSED_VALUE(guard);
- if (!m_route.IsValid() || !IsNavigable())
+ if (!m_route.IsValid())
{
// nothing should be displayed on the screen about turns if these lines are executed
info = FollowingInfo();
return;
}
+ if (!IsNavigable())
+ {
+ info = FollowingInfo();
+ formatDistFn(m_route.GetTotalDistanceMeters(), info.m_distToTarget, info.m_targetUnitsSuffix);
+ return;
+ }
+
formatDistFn(m_route.GetCurrentDistanceToEndMeters(), info.m_distToTarget, info.m_targetUnitsSuffix);
double distanceToTurnMeters = 0.;