Ignore:
Timestamp:
Aug 24, 2014 8:57:46 PM (7 years ago)
Author:
toby
Message:

variable change logging finally works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branch/logging/GSASIIpwdGUI.py

    r1453 r1477  
    16001600            dlg.Destroy()
    16011601
    1602     def OnHistoType(event):
    1603         Obj = event.GetEventObject()
    1604         data['Type'] = Obj.GetValue()
    1605         if data['Type'] == 'Bragg-Brentano' and 'Shift' not in data:    #set up defaults for new type(s)
    1606             data['Shift'] = [0.0,False]
    1607             data['Transparency'] = [0.0,False]
     1602    def OnHistoChange():
     1603        '''Called when the histogram type is changed to refresh the window
     1604        '''
    16081605        wx.CallAfter(UpdateSampleGrid,G2frame,data)
    16091606       
     
    16951692    if 'SlitLen' not in data and 'SASD' in histName:
    16961693        data['SlitLen'] = 0.0
     1694    if 'Shift' not in data:
     1695        data['Shift'] = [0.0,False]
     1696    if 'Transparency' not in data:
     1697        data['Transparency'] = [0.0,False]
    16971698    data['InstrName'] = data.get('InstrName','')
    16981699#patch end
     
    17251726                    0,WACV)
    17261727        choices = ['Debye-Scherrer','Bragg-Brentano',]
    1727         histoType = wx.ComboBox(G2frame.dataDisplay,wx.ID_ANY,value=data['Type'],choices=choices,
    1728             style=wx.CB_READONLY|wx.CB_DROPDOWN)
    1729         histoType.Bind(wx.EVT_COMBOBOX, OnHistoType)
     1728        histoType = G2gd.G2ChoiceButton(G2frame.dataDisplay,choices,
     1729                    strLoc=data,strKey='Type',
     1730                    onChoice=OnHistoChange)
    17301731        nameSizer.Add(histoType)
    17311732        mainSizer.Add(nameSizer,0,wx.EXPAND,1)
Note: See TracChangeset for help on using the changeset viewer.