Changeset 3750 for trunk/GSASIIphsGUI.py
- Timestamp:
- Dec 3, 2018 4:12:29 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r3744 r3750 2001 2001 def ModulatedSizer(name): 2002 2002 2003 # def showSSG(msg,text,table):2004 # 'Show the symmetry information, redraw window after'2005 # dlg = G2G.SGMessageBox(General,msg,text,table)2006 # dlg.CenterOnParent()2007 # dlg.ShowModal()2008 # dlg.Destroy()2009 # UpdateGeneral()2010 #2011 def OnSuperEnter(event):2012 'Close dialog after enter is pressed'2013 event.GetEventObject().Parent.EndModal(wx.ID_OK)2014 2015 2003 def OnShowSOps(event): 2016 2004 SSGData = generalData['SSGData'] … … 2021 2009 def OnSuperGp(event): #for HKLF needs to reject SSgps not agreeing with modVec! 2022 2010 'Respond to selection of a modulation group' 2023 Choice = [] 2024 if not SGData['SGFixed']: 2025 Choice = G2spc.SSChoice(SGData) 2026 if len(Choice) == 0: return 2027 #parent = event.GetEventObject().GetTopLevelParent() 2028 parent = General 2029 dlg = wx.Dialog(parent,style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER) 2011 wx.BeginBusyCursor() 2012 Choice = G2spc.SSChoice(SGData) 2013 wx.EndBusyCursor() 2014 dlg = wx.Dialog(General,style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER) 2030 2015 sizer = wx.BoxSizer(wx.VERTICAL) 2031 sizer.Add(wx.StaticText(dlg,wx.ID_OK, 2032 'Select or enter a modulation group' 2033 ),0,wx.ALIGN_CENTER) 2034 2016 sizer.Add(wx.StaticText(dlg,wx.ID_OK,'Select or enter a modulation group'),0,wx.ALIGN_CENTER) 2035 2017 sizer.Add((10,10)) 2036 # Zstep = G2G.ValidatedTxtCtrl(drawOptions,drawingData,'Zstep',nDig=(10,2),min=0.01,max=4.0) 2037 superGp = wx.ComboBox(dlg,value=generalData['SuperSg'],choices=Choice,style=wx.CB_DROPDOWN|wx.TE_PROCESS_ENTER) 2038 superGp.Bind(wx.EVT_TEXT_ENTER,OnSuperEnter) 2018 superGp = wx.ComboBox(dlg,value=generalData['SuperSg'],choices=Choice,style=wx.CB_DROPDOWN|wx.TE_READONLY) 2039 2019 sizer.Add(superGp) 2040 2020 sizer.Add((10,10)) … … 2074 2054 # needed in case someone manually enters an invalid SSG? 2075 2055 Text = '\n'.join([E+'\nSuperspace Group entry ignored']) 2076 G2G.G2MessageBox( parent,Text,'Superspace Group Error')2056 G2G.G2MessageBox(General,Text,'Superspace Group Error') 2077 2057 wx.CallAfter(UpdateGeneral) 2078 2058 … … 2092 2072 SpGrp += " 1'" 2093 2073 modSizer.Add(wx.StaticText(General,label=' Superspace group: %s '%SpGrp),0,WACV) 2094 Choice = []2095 2074 if not SGData['SGFixed']: 2096 Choice = G2spc.SSChoice(SGData)2097 if len(Choice):2098 2075 val = generalData['SuperSg'] 2099 if val.strip() == "": val = Choice[0]2100 2076 superGp = wx.Button(General,wx.ID_ANY,val,size=(100,-1)) 2101 2077 superGp.Bind(wx.EVT_BUTTON,OnSuperGp)
Note: See TracChangeset
for help on using the changeset viewer.