Changeset 1512 for trunk/GSASIIpwdGUI.py


Ignore:
Timestamp:
Oct 1, 2014 10:35:23 PM (8 years ago)
Author:
toby
Message:

implement logging and config storage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r1507 r1512  
    17221722            dlg.Destroy()
    17231723
    1724     def OnHistoType(event):
    1725         Obj = event.GetEventObject()
    1726         data['Type'] = Obj.GetValue()
    1727         if data['Type'] == 'Bragg-Brentano' and 'Shift' not in data:    #set up defaults for new type(s)
    1728             data['Shift'] = [0.0,False]
    1729             data['Transparency'] = [0.0,False]
     1724    def OnHistoChange():
     1725        '''Called when the histogram type is changed to refresh the window
     1726        '''
    17301727        wx.CallAfter(UpdateSampleGrid,G2frame,data)
    17311728       
     
    18191816    if 'SlitLen' not in data and 'SASD' in histName:
    18201817        data['SlitLen'] = 0.0
     1818    if 'Shift' not in data:
     1819        data['Shift'] = [0.0,False]
     1820    if 'Transparency' not in data:
     1821        data['Transparency'] = [0.0,False]
    18211822    data['InstrName'] = data.get('InstrName','')
    18221823#patch end
     
    18521853        else:
    18531854            choices = ['Debye-Scherrer','Bragg-Brentano',]
    1854         histoType = wx.ComboBox(G2frame.dataDisplay,wx.ID_ANY,value=data['Type'],choices=choices,
    1855             style=wx.CB_READONLY|wx.CB_DROPDOWN)
    1856         histoType.Bind(wx.EVT_COMBOBOX, OnHistoType)
     1855        histoType = G2gd.G2ChoiceButton(G2frame.dataDisplay,choices,
     1856                    strLoc=data,strKey='Type',
     1857                    onChoice=OnHistoChange)
    18571858        nameSizer.Add(histoType)
    18581859        mainSizer.Add(nameSizer,0,wx.EXPAND,1)
Note: See TracChangeset for help on using the changeset viewer.