daboide Commit
Revision 581
Date: 2006-05-24 16:10:13 -0700 (Wed, 24 May 2006)
Author: ed

Changed:
U   trunk/ClassDesigner.py

Log:
Fixed the problem with the use of MRU selection when adding custom classes to 
the design surface. Windows doesn't process context menus correctly, and this 
fix takes that into account. Tracker #0081.


Diff:
Modified: trunk/ClassDesigner.py
===================================================================
--- trunk/ClassDesigner.py      2006-05-23 18:03:34 UTC (rev 580)
+++ trunk/ClassDesigner.py      2006-05-24 23:10:13 UTC (rev 581)
@@ -1971,15 +1971,15 @@
                is passed, or by an MRU selection, in which case a menu event
                is passed.
                """
-               if isinstance(pathOrEvent, dEvents.Hit):
-                       print "EVT", dir(pathOrEvent)
-                       self.EVT = pathOrEvent
-               
                if isinstance(pathOrEvent, basestring):
                        pth = pathOrEvent
                else:
                        # Picked from an MRU list
-                       pth = pathOrEvent.prompt
+                       try:
+                               pth = pathOrEvent.prompt
+                       except AttributeError:
+                               # Windows menus are messed up!
+                               pth = pathOrEvent.EventObject.Caption
                        while pth[0] in ("& 0123456789"):
                                # Strip out the ordering information
                                pth = pth[1:]




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to