]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_extras.py
Fixed error in translation ( thanks to Nerijus Baliunas for spotting it )
[wxWidgets.git] / wxPython / src / _extras.py
index cc7b8ce623340f03fc75a88550e92e02ca57a587..851e4557c521193981ff8a7814a0ce67a3ea22f8 100644 (file)
@@ -75,6 +75,9 @@ def EVT_SET_FOCUS(win, func):
 def EVT_KILL_FOCUS(win, func):
     win.Connect(-1, -1, wxEVT_KILL_FOCUS, func)
 
+def EVT_CHILD_FOCUS(win, func):
+    win.Connect(-1, -1, wxEVT_CHILD_FOCUS, func)
+
 def EVT_ACTIVATE(win, func):
     win.Connect(-1, -1, wxEVT_ACTIVATE, func)
 
@@ -637,7 +640,8 @@ def wxPyTypeCast(obj, typeStr):
     theClass = globals()[typeStr+"Ptr"]
     typeStr = __wxPyPtrTypeMap.get(typeStr, typeStr)
     if hasattr(obj, "this"):
-        if obj.__class__ is theClass:   # if already the right type then just return it
+        # if already the right type then just return it
+        if isinstance(obj, theClass) or obj.__class__ is theClass:
             return obj
         newPtr = ptrcast(obj.this, typeStr+"_p")
     else: