Changeset 1472


Ignore:
Timestamp:
Aug 20, 2014 1:31:24 PM (7 years ago)
Author:
toby
Message:

fix wx3 bug: no wx.CB_SORT on Mac

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r1470 r1472  
    377377        comboSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Color bar '),0,WACV)
    378378        colSel = wx.ComboBox(parent=G2frame.dataDisplay,value=data['color'],choices=colorList,
    379             style=wx.CB_READONLY|wx.CB_DROPDOWN|wx.CB_SORT)
     379            style=wx.CB_READONLY|wx.CB_DROPDOWN)
    380380        colSel.Bind(wx.EVT_COMBOBOX, OnNewColorBar)
    381381        comboSizer.Add(colSel,0,WACV)
     
    666666        dataSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Bin style: Constant step bins in'),0,WACV)           
    667667        binSel = wx.ComboBox(parent=G2frame.dataDisplay,value=data['binType'],choices=binChoice,
    668             style=wx.CB_READONLY|wx.CB_DROPDOWN|wx.CB_SORT)
     668            style=wx.CB_READONLY|wx.CB_DROPDOWN)
    669669        binSel.Bind(wx.EVT_COMBOBOX, OnNewBinType)
    670670        dataSizer.Add(binSel,0,WACV)
     
    874874        comboSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Calibrant '),0,WACV)
    875875        calSel = wx.ComboBox(parent=G2frame.dataDisplay,value=data['calibrant'],choices=calList,
    876             style=wx.CB_READONLY|wx.CB_DROPDOWN|wx.CB_SORT)
     876            style=wx.CB_READONLY|wx.CB_DROPDOWN)
    877877        calSel.Bind(wx.EVT_COMBOBOX, OnNewCalibrant)
    878878        comboSizer.Add(calSel,0,WACV)
     
    965965    #end fix
    966966   
    967     colorList = [m for m in mpl.cm.datad.keys() if not m.endswith("_r")]
    968     calList = [m for m in calFile.Calibrants.keys()]
     967    colorList = sorted([m for m in mpl.cm.datad.keys() if not m.endswith("_r")],key=lambda s: s.lower())
     968    calList = sorted([m for m in calFile.Calibrants.keys()],key=lambda s: s.lower())
    969969    typeList = ['PWDR - powder diffraction data','SASD - small angle scattering data',
    970970        'REFL - reflectometry data']
Note: See TracChangeset for help on using the changeset viewer.