]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/src/windows2.i
Some tweaks and updates
[wxWidgets.git] / utils / wxPython / src / windows2.i
index 0ae660088c62d4452d460c1cc693a1673fdf8d71..6aa7c46e7c5f20fc0543b367cc82bc09f251fa24 100644 (file)
@@ -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;