From 1e64ae1faf34b16a6861d2bfd3f1539aceb8ecd5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 15 Aug 2007 11:36:50 +0000 Subject: [PATCH] use one shot timers in wxAnimationCtrl (patch 1774535) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/generic/animateg.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 240827e296..a51c95621c 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -122,6 +122,7 @@ wxMSW: - Fixed bug with symbol resolving in wxStackWalker (Axel Gembe). - Fixed showing busy cursor for disabled windows and during wxExecute() - Added wxBORDER_THEME, used automatically by wxTextCtrl in wxTE_RICH[2] mode. +- Fix problems with timers on SMP machines in wxAnimationCtrl (Gennady) wxGTK: diff --git a/src/generic/animateg.cpp b/src/generic/animateg.cpp index 3c026ef61b..4888745ae6 100644 --- a/src/generic/animateg.cpp +++ b/src/generic/animateg.cpp @@ -417,7 +417,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; } @@ -662,7 +662,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))