diff --git a/map/render_policy.cpp b/map/render_policy.cpp index ce82e3616b..9105860d30 100644 --- a/map/render_policy.cpp +++ b/map/render_policy.cpp @@ -112,12 +112,15 @@ void RenderPolicy::StopRotate(double a, double) void RenderPolicy::BeginFrame(shared_ptr const & e, ScreenBase const & s) { + /// processing animations at the beginning of the frame. + /// it's crucial as in this function could happen transition from + /// animating to non-animating state which should be properly handled + /// in the following RenderPolicy::DrawFrame call. + m_controller->PerformStep(); } void RenderPolicy::EndFrame(shared_ptr const & e, ScreenBase const & s) { - /// processing animations at the end of the frame - m_controller->PerformStep(); } bool RenderPolicy::DoSupportRotation() const diff --git a/map/rotate_screen_task.cpp b/map/rotate_screen_task.cpp index 3beecb95e3..000afa14a8 100644 --- a/map/rotate_screen_task.cpp +++ b/map/rotate_screen_task.cpp @@ -19,6 +19,7 @@ void RotateScreenTask::OnStep(double ts) anim::AngleInterpolation::OnStep(ts); Navigator & nav = m_framework->GetNavigator(); nav.SetAngle(nav.Screen().GetAngle() + m_outAngle - prevAngle); + m_framework->Invalidate(); } void RotateScreenTask::OnEnd(double ts) @@ -26,6 +27,7 @@ void RotateScreenTask::OnEnd(double ts) anim::AngleInterpolation::OnEnd(ts); Navigator & nav = m_framework->GetNavigator(); nav.SetAngle(m_outAngle); + m_framework->Invalidate(); } bool RotateScreenTask::IsVisual() const