diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-10-24 21:06:38 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:31:34 +0300 |
commit | 3900cc9a514ec9dfac37f2ee91425b99ad606194 (patch) | |
tree | 800b50660b8659d96809f871e6ee1ec110bb5b7a /map/location_state.cpp | |
parent | 73adaafe5b6525ed68f2dc224fd5be397ce1d49f (diff) |
bug fix
Diffstat (limited to 'map/location_state.cpp')
-rw-r--r-- | map/location_state.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/map/location_state.cpp b/map/location_state.cpp index e5717b115f..6204265c02 100644 --- a/map/location_state.cpp +++ b/map/location_state.cpp @@ -718,6 +718,12 @@ void State::StopLocationFollow() } } +void State::SetFixedZoom() +{ + LOG(LINFO, ("UVR : SetFixedZoom")); + SetModeInfo(IncludeModeBit(m_modeInfo, FixedZoomBit)); +} + void State::DragStarted() { m_dragModeInfo = m_modeInfo; @@ -797,9 +803,12 @@ void State::AnimateStateTransition(Mode oldMode, Mode newMode) if (oldMode == PendingPosition && newMode == Follow) { - m2::PointD const size(m_errorRadius, m_errorRadius); - m_framework->ShowRectExVisibleScale(m2::RectD(m_position - size, m_position + size), - scales::GetUpperComfortScale()); + if (!TestModeBit(m_modeInfo, FixedZoomBit)) + { + m2::PointD const size(m_errorRadius, m_errorRadius); + m_framework->ShowRectExVisibleScale(m2::RectD(m_position - size, m_position + size), + scales::GetUpperComfortScale()); + } } else if (newMode == RotateAndFollow) { @@ -826,12 +835,12 @@ void State::AnimateFollow() if (!IsModeChangeViewport()) return; + SetModeInfo(ExcludeModeBit(m_modeInfo, FixedZoomBit)); + if (!FollowCompass()) { if (!m_position.EqualDxDy(m_framework->GetViewportCenter(), POSITION_TOLERANCE)) - { m_framework->SetViewportCenterAnimated(m_position); - } } } |