]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/gizmos/mac/gizmos_wrap.cpp
todos, cleanups, detabified
[wxWidgets.git] / wxPython / contrib / gizmos / mac / gizmos_wrap.cpp
index a19ffa4097ad825366357269e3afcb0f9b99fc81..ca5922e8eb9f6c06f07a5bb868eb165308fbecbe 100644 (file)
@@ -790,11 +790,12 @@ PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId cons
     } 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);      
 
@@ -804,7 +805,7 @@ PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId cons
         Py_DECREF(o3);
     }
     return target;
-}
+  }
 
 
 PyObject *wxPyTreeListCtrl_GetBoundingRect(wxPyTreeListCtrl *self,wxTreeItemId const &item,bool textOnly){