X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d541f61fffc840d4587a0ed446b07d09642bf77b..3bdec81e147765682eda34adb84288a5eb9ab6c2:/wxPython/src/grid.i diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 9b01265c22..4b63e19d07 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -593,6 +593,7 @@ public: rval = *ptr; } else if (PySequence_Check(ro) && PyObject_Length(ro) == 2) { + PyErr_Clear(); // Clear the exception left over from wxPyConvertSwigPtr PyObject* o1 = PySequence_GetItem(ro, 0); PyObject* o2 = PySequence_GetItem(ro, 1); if (PyNumber_Check(o1) && PyNumber_Check(o2)) @@ -643,7 +644,7 @@ IMP_PYCALLBACK__STRING( wxPyGridCellRenderer, wxGridCellRenderer, SetParameters) // Let SWIG know about it so it can create the Python version class wxPyGridCellRenderer : public wxGridCellRenderer { public: - %pythonAppend wxPyGridCellRenderer "self._setCallbackInfo(self, PyGridCellRenderer);self._setOORInfo(self)" + %pythonAppend wxPyGridCellRenderer "self._setOORInfo(self);" setCallbackInfo(PyGridCellRenderer); wxPyGridCellRenderer(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -883,7 +884,7 @@ IMP_PYCALLBACK_STRING__constpure(wxPyGridCellEditor, wxGridCellEditor, GetValue) // Let SWIG know about it so it can create the Python version class wxPyGridCellEditor : public wxGridCellEditor { public: - %pythonAppend wxPyGridCellEditor "self._setCallbackInfo(self, PyGridCellEditor);self._setOORInfo(self)" + %pythonAppend wxPyGridCellEditor "self._setOORInfo(self);" setCallbackInfo(PyGridCellEditor) wxPyGridCellEditor(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -1123,7 +1124,7 @@ public: class wxPyGridCellAttrProvider : public wxGridCellAttrProvider { public: - %pythonAppend wxPyGridCellAttrProvider "self._setCallbackInfo(self, PyGridCellAttrProvider)" + %pythonAppend wxPyGridCellAttrProvider setCallbackInfo(PyGridCellAttrProvider) wxPyGridCellAttrProvider(); void _setCallbackInfo(PyObject* self, PyObject* _class); @@ -1352,7 +1353,7 @@ public: class wxPyGridTableBase : public wxGridTableBase { public: - %pythonAppend wxPyGridTableBase "self._setCallbackInfo(self, PyGridTableBase);self._setOORInfo(self)" + %pythonAppend wxPyGridTableBase "self._setOORInfo(self);" setCallbackInfo(PyGridTableBase) wxPyGridTableBase(); void _setCallbackInfo(PyObject* self, PyObject* _class);