Use more readable wxTimer::StartOnce() instead of Start(true)

No real changes, just make it more clear what the code does.
This commit is contained in:
Vadim Zeitlin 2023-08-25 20:43:48 +02:00
parent 0af5a0165a
commit a91e974004

View file

@ -349,7 +349,7 @@ bool wxGenericAnimationCtrl::Play(bool looped)
int delay = m_animation.GetDelay(0);
if (delay == 0)
delay = 1; // 0 is invalid timeout for wxTimer.
m_timer.Start(delay, true);
m_timer.StartOnce(delay);
return true;
}
@ -593,7 +593,7 @@ void wxGenericAnimationCtrl::OnTimer(wxTimerEvent &WXUNUSED(event))
int delay = m_animation.GetDelay(m_currentFrame);
if (delay == 0)
delay = 1; // 0 is invalid timeout for wxTimer.
m_timer.Start(delay, true);
m_timer.StartOnce(delay);
}
void wxGenericAnimationCtrl::OnSize(wxSizeEvent &WXUNUSED(event))