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:
authorExMix <rahuba.youri@mapswithme.com>2014-10-24 21:06:38 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:31:34 +0300
commit3900cc9a514ec9dfac37f2ee91425b99ad606194 (patch)
tree800b50660b8659d96809f871e6ee1ec110bb5b7a /map/location_state.cpp
parent73adaafe5b6525ed68f2dc224fd5be397ce1d49f (diff)
bug fix
Diffstat (limited to 'map/location_state.cpp')
-rw-r--r--map/location_state.cpp19
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);
- }
}
}