diff --git a/drape_frontend/frontend_renderer.cpp b/drape_frontend/frontend_renderer.cpp index b391766017..c290833896 100755 --- a/drape_frontend/frontend_renderer.cpp +++ b/drape_frontend/frontend_renderer.cpp @@ -416,8 +416,11 @@ void FrontendRenderer::AcceptMessage(ref_ptr message) : msg->GetPreferredZoomLevelIn3d()); m_overlayTree->SetFollowingMode(true); if (m_enable3dInNavigation) + { + bool immediatelyStart = !m_myPositionController->IsRotationActive(); AddUserEvent(EnablePerspectiveEvent(msg->GetRotationAngle(), msg->GetAngleFOV(), - true /* animated */, false /* immediately start*/)); + true /* animated */, immediatelyStart)); + } break; } diff --git a/drape_frontend/my_position_controller.hpp b/drape_frontend/my_position_controller.hpp index 7acfdd1800..7928250c66 100644 --- a/drape_frontend/my_position_controller.hpp +++ b/drape_frontend/my_position_controller.hpp @@ -85,6 +85,7 @@ public: dp::UniformValuesStorage const & commonUniforms); bool IsFollowingActive() const; + bool IsRotationActive() const; bool IsInRouting() const; private: @@ -98,8 +99,6 @@ private: location::EMyPositionMode GetMode() const; void CallModeListener(uint32_t mode); - bool IsRotationActive() const; - bool IsVisible() const { return m_isVisible; } void SetIsVisible(bool isVisible) { m_isVisible = isVisible; } diff --git a/drape_frontend/user_event_stream.cpp b/drape_frontend/user_event_stream.cpp index e085237448..cf9a420a74 100644 --- a/drape_frontend/user_event_stream.cpp +++ b/drape_frontend/user_event_stream.cpp @@ -342,17 +342,23 @@ bool UserEventStream::SetCenter(m2::PointD const & center, int zoom, bool isAnim ScreenBase const & currentScreen = GetCurrentScreen(); - bool const isScaleAllowableIn3d = IsScaleAllowableIn3d(zoom); - bool const finishIn3d = m_discardedFOV > 0.0 && isScaleAllowableIn3d; - bool const finishIn2d = currentScreen.isPerspective() && !isScaleAllowableIn3d; - ScreenBase screen = currentScreen; - if (finishIn3d) - screen.ApplyPerspective(m_discardedAngle, m_discardedAngle, m_discardedFOV); - else if (finishIn2d) - screen.ResetPerspective(); + bool finishIn2d = false; + bool finishIn3d = false; + if (zoom != -1) + { + bool const isScaleAllowableIn3d = IsScaleAllowableIn3d(zoom); + finishIn3d = m_discardedFOV > 0.0 && isScaleAllowableIn3d; + finishIn2d = currentScreen.isPerspective() && !isScaleAllowableIn3d; + + if (finishIn3d) + screen.ApplyPerspective(m_discardedAngle, m_discardedAngle, m_discardedFOV); + else if (finishIn2d) + screen.ResetPerspective(); + } double const scale3d = screen.PixelRect().SizeX() / screen.PixelRectIn3d().SizeX(); + if (zoom == -1) { m2::AnyRectD const r = GetTargetRect();