Changeset 1526 for trunk/GSASIIlog.py


Ignore:
Timestamp:
Oct 15, 2014 5:00:42 PM (7 years ago)
Author:
toby
Message:

address menu trace problem with wx 2.9+

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlog.py

    r1521 r1526  
    411411            return
    412412        menu = parentmenu
    413 
     413       
     414    i,j= wx.__version__.split('.')[0:2]
     415    if int(i)+int(j)/10. > 2.8 and 'wxOSX' in wx.PlatformInfo:
     416        # on mac, with wx 2.9+ the menubar has a menu and this is found above, so
     417        # we are now done.
     418        return menuLabelList,menuitem
     419   
    414420    menubar = menu.MenuBar
    415421    for i in range(menubar.GetMenuCount()):
    416422        if menubar.GetMenu(i) == menu:
    417423            menuLabelList += [menubar.GetMenuLabel(i)]
    418             break
    419     else:
    420         # menu not found in menubar, something is wrong
    421         print 'error tracing menuitem to menubar',menuLabelList
    422         #raise Exception('debug2: error tracing menuitem')
    423         return
    424     return menuLabelList,menuitem
     424            return menuLabelList,menuitem
     425
     426    # menu not found in menubar, something is wrong
     427    print 'error tracing menuitem to menubar',menuLabelList
     428    #raise Exception('debug2: error tracing menuitem')
     429    return
    425430
    426431def SaveMenuCommand(id,G2frame,handler):
Note: See TracChangeset for help on using the changeset viewer.