wxTimer::Start() now calls Stop()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -115,6 +115,26 @@ void wxTimerBase::Notify()
|
||||
(void)m_owner->ProcessEvent(event);
|
||||
}
|
||||
|
||||
bool wxTimerBase::Start(int milliseconds, bool oneShot)
|
||||
{
|
||||
if ( IsRunning() )
|
||||
{
|
||||
// not stopping the already running timer might work for some
|
||||
// platforms (no problems under MSW) but leads to mysterious crashes
|
||||
// on the others (GTK), so to be on the safe side do it here
|
||||
Stop();
|
||||
}
|
||||
|
||||
if ( milliseconds != -1 )
|
||||
{
|
||||
m_milli = milliseconds;
|
||||
}
|
||||
|
||||
m_oneShot = oneShot;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user