Changeset 3729


Ignore:
Timestamp:
Nov 13, 2018 9:52:00 AM (3 years ago)
Author:
vondreele
Message:

make super group ComboBox? allow editing for nonOSX.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r3728 r3729  
    19931993           
    19941994        def ModulatedSizer(name):
     1995           
    19951996            def showSSG(General,msg,text,table,refresh):
    19961997                'Show the symmetry information, redraw window if needed'
     
    19992000                dlg.Destroy()
    20002001                if refresh: UpdateGeneral()
     2002               
    20012003            def OnSuperGp(event):   #for HKLF needs to reject SSgps not agreeing with modVec!
    20022004                'Respond to selection of a modulation group'
    20032005                event.Skip()
     2006                refresh = True
    20042007                try:
    20052008                    SSymbol = superGp.GetValue()
    2006                     refresh = True
    20072009                except AttributeError:
    20082010                    SSymbol = superGp.GetLabel()
     
    20212023                    wx.CallLater(100,showSSG,General,msg,text,table,refresh)
    20222024                else:
    2023                     # needed in case someone manually enters an invalid SG?
     2025                    # needed in case someone manually enters an invalid SSG?
    20242026                    text = [E+'\nSuperspace Group set to previous']
    20252027                    superGp.SetValue(generalData['SuperSg'])
     
    20512053                    Choice = [G2spc.fixGray(SGData,item) for item in Choice]
    20522054            if len(Choice):
    2053                 # removed code that allows entries to be typed in
    2054                 # because Bind to EVT_TEXT_ENTER caused two calls to OnSuperGp
    2055 #                superGp = wx.ComboBox(General,value=generalData['SuperSg'],choices=Choice,style=wx.CB_DROPDOWN|wx.TE_PROCESS_ENTER)
    2056 #                superGp.Bind(wx.EVT_TEXT_ENTER,OnSuperGp)
    2057                 superGp = wx.ComboBox(General,value=generalData['SuperSg'],choices=Choice,style=wx.CB_DROPDOWN|wx.CB_READONLY)
    2058                 superGp.Bind(wx.EVT_COMBOBOX,OnSuperGp)
     2055                i,j= wx.__version__.split('.')[0:2]
     2056                if int(i)+int(j)/10. > 2.8 and 'wxOSX' in wx.PlatformInfo:      #since this seems to fail on a Mac!
     2057                    superGp = wx.ComboBox(General,value=generalData['SuperSg'],choices=Choice,style=wx.CB_DROPDOWN|wx.CB_READONLY)
     2058                    superGp.Bind(wx.EVT_COMBOBOX,OnSuperGp)
     2059                else:
     2060                    superGp = wx.ComboBox(General,value=generalData['SuperSg'],choices=Choice,style=wx.CB_DROPDOWN|wx.TE_PROCESS_ENTER)
     2061                    superGp.Bind(wx.EVT_COMBOBOX,OnSuperGp)
     2062                    superGp.Bind(wx.EVT_TEXT_ENTER,OnSuperGp)
    20592063            else:
    20602064                superGp = wx.StaticText(General,label=generalData['SuperSg'])
  • trunk/GSASIIspc.py

    r3716 r3729  
    534534    return OpText
    535535
    536 def TextGen(SGData,reverse=False):
     536def TextGen(SGData,reverse=False):      #does not always work correctly - not used anyway
    537537    GenSym,GenFlg,BNSsym = GetGenSym(SGData)
    538538    SGData['GenSym'] = GenSym
  • trunk/SUBGROUPS.py

    r3716 r3729  
    195195    text,table = G2spc.SGPrint(SGData)
    196196    OpList = G2spc.TextOps(text,table,reverse=True)
    197 #    GenList = G2spc.TextGen(SGData,reverse=True)
     197#    OpList = G2spc.TextGen(SGData,reverse=True)
    198198    for item in OpList:
    199199        item += '\n'
Note: See TracChangeset for help on using the changeset viewer.