]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/grid.i
handle mouse capture lost event in grid windows and reset the grid to normal state...
[wxWidgets.git] / wxPython / src / grid.i
index 225f899087d47454bc9de6f424c1edfb7c0c98e0..2574e9edb42ed37ac15629f2043312a3cd78d245 100644 (file)
@@ -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))
@@ -1605,7 +1606,7 @@ public:
     def __str__(self):                   return str(self.Get())
     def __repr__(self):                  return 'wxGridCellCoords'+str(self.Get())
     def __len__(self):                   return len(self.Get())
-    def __getitem__(self, index):        return self.asTuple()[index]
+    def __getitem__(self, index):        return self.Get()[index]
     def __setitem__(self, index, val):
         if index == 0: self.SetRow(val)
         elif index == 1: self.SetCol(val)