forked from organicmaps/organicmaps
Create animations only if the position or the azimuth were changed.
This commit is contained in:
parent
d1dcd7cc46
commit
dbef0c3df5
1 changed files with 10 additions and 5 deletions
|
@ -372,9 +372,11 @@ void MyPositionController::Assign(location::GpsInfo const & info, bool isNavigab
|
|||
if (m_listener)
|
||||
m_listener->PositionChanged(Position());
|
||||
|
||||
CreateAnim(oldPos, oldAzimut, screen);
|
||||
|
||||
m_isDirtyViewport = true;
|
||||
if (oldPos != m_position || oldAzimut != m_drawDirection)
|
||||
{
|
||||
CreateAnim(oldPos, oldAzimut, screen);
|
||||
m_isDirtyViewport = true;
|
||||
}
|
||||
}
|
||||
|
||||
void MyPositionController::Assign(location::CompassInfo const & info, ScreenBase const & screen)
|
||||
|
@ -389,9 +391,12 @@ void MyPositionController::Assign(location::CompassInfo const & info, ScreenBase
|
|||
}
|
||||
|
||||
SetDirection(info.m_bearing);
|
||||
CreateAnim(oldPos, oldAzimut, screen);
|
||||
|
||||
m_isDirtyViewport = true;
|
||||
if (oldPos != m_position || oldAzimut != m_drawDirection)
|
||||
{
|
||||
CreateAnim(oldPos, oldAzimut, screen);
|
||||
m_isDirtyViewport = true;
|
||||
}
|
||||
}
|
||||
|
||||
void MyPositionController::SetDirection(double bearing)
|
||||
|
|
Loading…
Add table
Reference in a new issue