X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/660658398148d82d492a5d1a944bc4058a082267..5cd7ab8dd8af0c17ce9dad88830a8d7aefd4f73b:/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