From: Vadim Zeitlin Date: Wed, 15 Aug 2007 11:36:50 +0000 (+0000) Subject: use one shot timers in wxAnimationCtrl (patch 1774535) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/48271822ef3d56c8f91af882b68fd1b674a8e8e6?ds=sidebyside use one shot timers in wxAnimationCtrl (patch 1774535) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/changes.txt b/docs/changes.txt index b41e293e4f..91189d5e85 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -215,6 +215,7 @@ wxMSW: - Fixed bug with symbol resolving in wxStackWalker (Axel Gembe) - Fixed showing busy cursor for disabled windows and during wxExecute() - Set the string of wxEVT_COMMAND_CHECKLISTBOX_TOGGLED events (Luca Cappa) +- Fix problems with timers on SMP machines in wxAnimationCtrl (Gennady) wxGTK: diff --git a/src/generic/animateg.cpp b/src/generic/animateg.cpp index d860f2d487..dc7062fc07 100644 --- a/src/generic/animateg.cpp +++ b/src/generic/animateg.cpp @@ -418,7 +418,7 @@ bool wxAnimationCtrl::Play(bool looped) int delay = m_animation.GetDelay(0); if (delay == 0) delay = 1; // 0 is invalid timeout for wxTimer. - m_timer.Start(delay); + m_timer.Start(delay, true); return true; } @@ -663,7 +663,7 @@ void wxAnimationCtrl::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); + m_timer.Start(delay, true); } void wxAnimationCtrl::OnSize(wxSizeEvent &WXUNUSED(event))