dabo Commit
Revision 3895
Date: 2008-01-27 07:07:36 -0800 (Sun, 27 Jan 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/3895

Changed:
U   trunk/dabo/ui/uiwx/__init__.py

Log:
Modified the 'getObjectAtPosition()' method to only return a Dabo object. If a 
plan wxPython-level control is initially found, its containership hierarchy 
will be traversed until a Dabo control (i.e., one that inherits from dPemMixin) 
is found.



Diff:
Modified: trunk/dabo/ui/uiwx/__init__.py
===================================================================
--- trunk/dabo/ui/uiwx/__init__.py      2008-01-22 03:15:56 UTC (rev 3894)
+++ trunk/dabo/ui/uiwx/__init__.py      2008-01-27 15:07:36 UTC (rev 3895)
@@ -563,7 +563,13 @@
        """
        if y is None:
                x, y = x
-       return wx.FindWindowAtPoint((x,y))
+       win = wx.FindWindowAtPoint((x,y))
+       while not isinstance(win, dabo.ui.dPemMixin):
+               try:
+                       win = win.GetParent()
+               except AttributeError:
+                       break
+       return win
 
 
 def isControlDown():




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to