From cecc69679647471e17c5bb0b46c802a6539e58e1 Mon Sep 17 00:00:00 2001 From: ExMix Date: Thu, 2 Oct 2014 17:22:53 +0300 Subject: [PATCH] [core] in lite version we draw look direction for my position --- map/location_state.cpp | 9 +++++++-- map/location_state.hpp | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/map/location_state.cpp b/map/location_state.cpp index a092c2d49c..64e12b2912 100644 --- a/map/location_state.cpp +++ b/map/location_state.cpp @@ -271,7 +271,7 @@ void State::draw(graphics::OverlayRenderer * r, r->drawDisplayList(m_locationMarkDL.get(), drawM); // if we know look direction than we draw arrow - if (IsRotationActive()) + if (IsDirectionKnown()) { double rotateAngle = m_drawDirection + m_framework->GetNavigator().Screen().GetAngle(); @@ -361,7 +361,12 @@ void State::CacheLocationMark() bool State::IsRotationActive() const { - return m_framework->GetNavigator().DoSupportRotation() && TestModeBit(m_modeInfo, KnownDirectionBit); + return m_framework->GetNavigator().DoSupportRotation() && IsDirectionKnown(); +} + +bool State::IsDirectionKnown() const +{ + return TestModeBit(m_modeInfo, KnownDirectionBit); } bool State::IsInRouting() const diff --git a/map/location_state.hpp b/map/location_state.hpp index 493386e65e..fc63293b8a 100644 --- a/map/location_state.hpp +++ b/map/location_state.hpp @@ -113,6 +113,7 @@ namespace location void CacheLocationMark(); bool IsRotationActive() const; + bool IsDirectionKnown() const; bool IsInRouting() const; void FollowCompass();