Changeset 2632


Ignore:
Timestamp:
Jan 15, 2017 1:57:08 PM (5 years ago)
Author:
toby
Message:

fix element selection for Linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIElemGUI.py

    r2611 r2632  
    2222import wx
    2323import os
     24import sys
    2425import wx.lib.colourselect as wscs
    2526class PickElement(wx.Dialog):
     
    8182            if name[0] == 'None':
    8283                butWid *= 2
    83             # patch for wx 2.9+ on Mac where EVT_COMBOBOX happens only on
     84            # patch for wx 2.9+ on Mac/Linux where EVT_COMBOBOX happens only on a
    8485            # value change. Not ideal because wx.CB_READONLY is better.
    8586            i,j= wx.__version__.split('.')[0:2]
    86             if int(i)+int(j)/10. > 2.8 and 'wxOSX' in wx.PlatformInfo:
    87 
     87            if int(i)+int(j)/10. > 2.8 and 'win' not in sys.platform:
    8888                El = wx.ComboBox(choices=name, parent=self, pos=pos, size=wx.Size(butWid,23),
    8989                    style=wx.CB_DROPDOWN, value=name[0]+' ') # add an invisible space
    9090            else:
    9191                El = wx.ComboBox(choices=name, parent=self, pos=pos, size=wx.Size(butWid,23),
    92                     style=wx.CB_READONLY, value=name[0]) 
     92                    style=wx.CB_READONLY, value=name[0])
    9393            El.Bind(wx.EVT_COMBOBOX,self.OnElButton)
    9494       
Note: See TracChangeset for help on using the changeset viewer.