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
path: root/map
diff options
context:
space:
mode:
authorrachytski <siarhei.rachytski@gmail.com>2012-11-14 20:50:45 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:46:56 +0300
commite16c4e4c13dd4ed564c78950cf61adce9c9ccf65 (patch)
treef7a6687c7f84d547092f84f4a7a2fd3fd92f976c /map
parentbce75c20de39ab21ef45fcd631ce07bcdf033647 (diff)
fixed picture freezing after animation end.
Diffstat (limited to 'map')
-rw-r--r--map/render_policy.cpp7
-rw-r--r--map/rotate_screen_task.cpp2
2 files changed, 7 insertions, 2 deletions
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<PaintEvent> 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<PaintEvent> 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