]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/grid_wrap.cpp
Force the output window to display at the begining of the app
[wxWidgets.git] / wxPython / src / mac / grid_wrap.cpp
index 9053d750fea6ab7f8612e3f1291f62e440d6e515..3c38f5bba34534d6eec3ac1d5d31720ab626078d 100644 (file)
@@ -1203,11 +1203,12 @@ void wxGridCellAttr__setOORInfo(wxGridCellAttr *self,PyObject *_self){
     } else if (target == Py_None) {  
         Py_DECREF(Py_None);
         target = o;
-    } else {                         
-        o2 = target;
-        target = PyTuple_New(1);
-        PyTuple_SetItem(target, 0, o2);
-
+    } else {
+        if (!PyTuple_Check(target)) {
+            o2 = target;
+            target = PyTuple_New(1);
+            PyTuple_SetItem(target, 0, o2);
+        }            
         o3 = PyTuple_New(1);            
         PyTuple_SetItem(o3, 0, o);      
 
@@ -1217,7 +1218,7 @@ void wxGridCellAttr__setOORInfo(wxGridCellAttr *self,PyObject *_self){
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 void wxGridCellAttrProvider__setOORInfo(wxGridCellAttrProvider *self,PyObject *_self){