diff --git a/drape_frontend/drape_engine.cpp b/drape_frontend/drape_engine.cpp index d695533765..f5ba8c5821 100644 --- a/drape_frontend/drape_engine.cpp +++ b/drape_frontend/drape_engine.cpp @@ -30,14 +30,17 @@ DrapeEngine::DrapeEngine(Params && params) location::EMyPositionMode mode = params.m_initialMyPositionMode.first; if (!params.m_initialMyPositionMode.second && !settings::Get(settings::kLocationStateMode, mode)) + { mode = location::MODE_UNKNOWN_POSITION; - - // If the screen rect setting in follow and rotate mode is missing or invalid, it could cause invalid animations, - // so the follow and rotate mode should be discarded. - m2::AnyRectD rect; - if (mode == location::MODE_ROTATE_AND_FOLLOW && - !(settings::Get("ScreenClipRect", rect) && df::GetWorldRect().IsRectInside(rect.GetGlobalRect()))) - mode = location::MODE_FOLLOW; + } + else if (mode == location::MODE_ROTATE_AND_FOLLOW) + { + // If the screen rect setting in follow and rotate mode is missing or invalid, it could cause invalid animations, + // so the follow and rotate mode should be discarded. + m2::AnyRectD rect; + if (!(settings::Get("ScreenClipRect", rect) && df::GetWorldRect().IsRectInside(rect.GetGlobalRect()))) + mode = location::MODE_FOLLOW; + } FrontendRenderer::Params frParams(make_ref(m_threadCommutator), params.m_factory, make_ref(m_textureManager), m_viewport,