reset one shot timer internal state instead of leaving it thinking that it's still running (mdified patch 1730597)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-06-04 13:34:54 +00:00
parent c49f887978
commit 74e10fcc6a
3 changed files with 21 additions and 2 deletions

View File

@@ -27,6 +27,7 @@
#include "wx/log.h"
#include "wx/apptrait.h"
#include "wx/platinfo.h"
#include "wx/wxchar.h"
// without this pragma, the stupid compiler precompiles #defines below so that
// changing them doesn't "take place" later!
@@ -2958,6 +2959,7 @@ void TestTimer()
virtual void Notify()
{
wxPrintf(_T("%d"), m_num++);
fflush(stdout);
if ( m_num == 10 )
{
@@ -2977,6 +2979,11 @@ void TestTimer()
wxEventLoop loop;
wxTimer timer1;
timer1.Start(100, true /* one shot */);
timer1.Stop();
timer1.Start(100, true /* one shot */);
MyTimer timer;
timer.Start(500);