Changeset 3782


Ignore:
Timestamp:
Jan 13, 2019 10:12:05 PM (3 years ago)
Author:
toby
Message:

enable/disable export menu items rather than menu contents

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r3781 r3782  
    570570                item.SetText('&Refine')
    571571            seqMode = False
    572         for menu in self.ExportSeq:
    573             for item in menu.GetMenuItems():
    574                 menu.Enable(item.Id,seqMode)
    575         for menu in self.ExportNonSeq:
    576             for item in menu.GetMenuItems():
    577                 menu.Enable(item.Id,not seqMode)
     572        for menu,Id in self.ExportSeq:
     573            menu.Enable(Id,seqMode)
     574        for menu,Id in self.ExportNonSeq:
     575            menu.Enable(Id,not seqMode)
    578576        return seqSetting
    579577
     
    25272525        projectmenu = wx.Menu()
    25282526        item = menu.AppendSubMenu(projectmenu,'Entire project as','Export entire project')
    2529         self.ExportNonSeq.append(projectmenu)
     2527        self.ExportNonSeq.append([menu,item.Id])
    25302528       
    25312529        phasemenu = wx.Menu()
     
    25472545        seqPhasemenu = wx.Menu()
    25482546        item = menu.AppendSubMenu(seqPhasemenu,'Sequential phases','Export phases from sequential fit')
    2549         self.ExportSeq.append(seqPhasemenu)
     2547        self.ExportSeq.append([menu,item.Id])
    25502548        seqHistmenu = wx.Menu()
    25512549        item = menu.AppendSubMenu(seqHistmenu,'Sequential histograms','Export histograms from sequential fit')
    2552         self.ExportSeq.append(seqHistmenu)
     2550        self.ExportSeq.append([menu,item.Id])
    25532551       
    25542552        # find all the exporter files
Note: See TracChangeset for help on using the changeset viewer.