Changeset 1031


Ignore:
Timestamp:
Aug 14, 2013 12:47:11 PM (8 years ago)
Author:
toby
Message:

fix enabling of Refine menu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r1030 r1031  
    187187        item = parent.Append(help='', id=wx.ID_ANY, kind=wx.ITEM_NORMAL,
    188188            text='&Refine')
     189        if len(self.Refine): # extend state for new menus to match main (on mac)
     190            state = self.Refine[0].IsEnabled()
     191        else:
     192            state = False
     193        item.Enable(state)
    189194        self.Refine.append(item)
    190         item.Enable(False)
    191195        self.Bind(wx.EVT_MENU, self.OnRefine, id=item.GetId())
    192196       
    193197        item = parent.Append(help='', id=wx.ID_ANY, kind=wx.ITEM_NORMAL,
    194198            text='Sequental refine')
     199        if len(self.SeqRefine): # extend state for new menus to match main (on mac)
     200            state = self.SeqRefine[0].IsEnabled()
     201        else:
     202            state = False
     203        item.Enable(state)
    195204        self.SeqRefine.append(item)
    196         item.Enable(False)
    197205        self.Bind(wx.EVT_MENU, self.OnSeqRefine, id=item.GetId())
    198206       
Note: See TracChangeset for help on using the changeset viewer.