X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/922dc97681d8b286a348f61778dd11a9b696658f..1afc06c2d8c945535175bf32e427aac0bbb704de:/utils/wxPython/src/windows2.i diff --git a/utils/wxPython/src/windows2.i b/utils/wxPython/src/windows2.i index 0ae660088c..6aa7c46e7c 100644 --- a/utils/wxPython/src/windows2.i +++ b/utils/wxPython/src/windows2.i @@ -131,15 +131,9 @@ public: for (col=0; col < self->GetCols(); col++) { wxGridCell* cell = self->GetCell(row, col); -#ifdef WXP_WITH_THREAD - PyEval_RestoreThread(wxPyEventThreadState); - wxPyInEvent = true; -#endif + bool doSave = wxPyRestoreThread(); PyObject* pyCell = wxPyConstructObject(cell, "wxGridCell"); -#ifdef WXP_WITH_THREAD - PyEval_SaveThread(); - wxPyInEvent = false; -#endif + wxPySaveThread(doSave); if (PyList_Append(rowList, pyCell) == -1) return NULL;