Changeset 1512 for trunk/GSASIIpwdGUI.py
- Timestamp:
- Oct 1, 2014 10:35:23 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpwdGUI.py
r1507 r1512 1722 1722 dlg.Destroy() 1723 1723 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 ''' 1730 1727 wx.CallAfter(UpdateSampleGrid,G2frame,data) 1731 1728 … … 1819 1816 if 'SlitLen' not in data and 'SASD' in histName: 1820 1817 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] 1821 1822 data['InstrName'] = data.get('InstrName','') 1822 1823 #patch end … … 1852 1853 else: 1853 1854 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) 1857 1858 nameSizer.Add(histoType) 1858 1859 mainSizer.Add(nameSizer,0,wx.EXPAND,1)
Note: See TracChangeset
for help on using the changeset viewer.