X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/660658398148d82d492a5d1a944bc4058a082267..4263de1e0586d20cb49d0dde23f0d227c5ef25cb:/wxPython/src/_timer.i diff --git a/wxPython/src/_timer.i b/wxPython/src/_timer.i index 5471ca7b26..b613bbc630 100644 --- a/wxPython/src/_timer.i +++ b/wxPython/src/_timer.i @@ -36,10 +36,10 @@ enum { void wxPyTimer::Notify() { bool found; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "Notify"))) wxPyCBH_callCallback(m_myInst, Py_BuildValue("()")); - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); if (! found) wxTimer::Notify(); } @@ -56,11 +56,6 @@ void wxPyTimer::base_Notify() { public: %pythonAppend wxPyTimer "self._setCallbackInfo(self, Timer, 0)" -// %pythonAppend wxTimer -// "if hasattr(self, 'Notify'): -// print 'bound EVT_TIMER to self.Notify' -// self.Bind(EVT_TIMER, self.Notify) -// self.SetOwner(self)"; // if you don't call SetOwner() or provide an owner in the contstructor // then you must override Notify() inorder to receive the timer