From 2eb11edbe8409e407f5a5e1dfbbe625ee9bc8dc3 Mon Sep 17 00:00:00 2001 From: Daria Volvenkova Date: Wed, 1 Jun 2016 19:55:00 +0300 Subject: [PATCH] Arrow animation reseting. --- drape_frontend/animation_system.cpp | 2 +- drape_frontend/user_event_stream.cpp | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drape_frontend/animation_system.cpp b/drape_frontend/animation_system.cpp index 21ecc54cba..1b70682c23 100644 --- a/drape_frontend/animation_system.cpp +++ b/drape_frontend/animation_system.cpp @@ -395,7 +395,7 @@ void AnimationSystem::Print() for (size_t i = 0, sz = m_animationChain.size(); i < sz; ++i) { auto & lst = *m_animationChain[i]; - if (i > 0 && i < sz - 1) + if (i > 0) LOG(LINFO, ("- - - - - - - - - - - - Next parallel block - - - - - - - - - - - -")); for (auto it = lst.begin(); it != lst.end(); ++it) { diff --git a/drape_frontend/user_event_stream.cpp b/drape_frontend/user_event_stream.cpp index 9ed7579e1f..ef4ebc9062 100644 --- a/drape_frontend/user_event_stream.cpp +++ b/drape_frontend/user_event_stream.cpp @@ -482,7 +482,12 @@ bool UserEventStream::InterruptFollowAnimations() if (followAnim != nullptr) { if (followAnim->CouldBeInterrupted()) + { + bool const isFollowAnim = followAnim->GetType() == Animation::MapFollow; ResetAnimations(followAnim->GetType()); + if (isFollowAnim) + ResetAnimations(Animation::Arrow); + } else return false; } @@ -589,7 +594,7 @@ void UserEventStream::SetEnable3dMode(double maxRotationAngle, double angleFOV, ResetAnimationsBeforeSwitch3D(); if (immediatelyStart) - ResetAnimations(Animation::MapFollow); + InterruptFollowAnimations(); double const startAngle = isAnim ? 0.0 : maxRotationAngle; double const endAngle = maxRotationAngle; @@ -612,7 +617,7 @@ void UserEventStream::SetEnable3dMode(double maxRotationAngle, double angleFOV, void UserEventStream::SetDisable3dModeAnimation() { ResetAnimationsBeforeSwitch3D(); - ResetAnimations(Animation::MapFollow); + InterruptFollowAnimations(); if (m_discardedFOV > 0.0 && IsScaleAllowableIn3d(GetDrawTileScale(GetCurrentScreen()))) { @@ -656,7 +661,6 @@ void UserEventStream::ResetAnimationsBeforeSwitch3D() { ResetAnimations(Animation::MapLinear); ResetAnimations(Animation::MapScale); - ResetAnimations(Animation::Sequence); ResetAnimations(Animation::MapPerspective, true /* finishAll */); }