Changeset 994
- Timestamp:
- Jul 17, 2013 9:08:29 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIgrid.py
r991 r994 130 130 ] = [wx.NewId() for item in range(1)] 131 131 132 [ wxID_SELECTPHASE, wxID_SELECTPAGE,133 ] = [wx.NewId() for item in range( 2)]132 [ wxID_SELECTPHASE, 133 ] = [wx.NewId() for item in range(1)] 134 134 135 135 [ wxID_PDFCOPYCONTROLS, wxID_PDFSAVECONTROLS, wxID_PDFLOADCONTROLS, … … 2136 2136 2137 2137 def ChangeSelection(self,page): 2138 # in thewx.Notebook ChangeSelection is like SetSelection, but it2138 # in wx.Notebook ChangeSelection is like SetSelection, but it 2139 2139 # does not invoke the event related to pressing the tab button 2140 2140 # I don't see a way to do that in aui. -
trunk/GSASIIphsGUI.py
r992 r994 4916 4916 '''This is called when an item is selected from the Select page menu 4917 4917 ''' 4918 for page in G2frame.dataDisplay.gridList: # clear out all grids, forcing edits in progress to complete4919 page.ClearGrid()4920 wx.Frame.Unbind(G2frame.dataFrame,wx.EVT_SIZE) # ignore size events during this routine4921 4918 page = event.GetId() 4922 # print 'Select',page4923 4919 G2frame.dataDisplay.SetSelection(page) 4924 4920 … … 4931 4927 wx.Frame.Unbind(G2frame.dataFrame,wx.EVT_SIZE) # ignore size events during this routine 4932 4928 page = event.GetSelection() 4933 #print 'Tab',page4929 print 'Tab',page 4934 4930 ChangePage(page) 4935 4931 4936 4932 def ChangePage(page): 4937 4933 text = G2frame.dataDisplay.GetPageText(page) 4938 # print page,text 4939 if text == 'Atoms': 4934 print page,text 4935 if text == 'General': 4936 G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DataGeneral) 4937 FillSelectPageMenu(G2frame.dataFrame.DataGeneral) 4938 G2frame.dataFrame.Bind(wx.EVT_MENU, OnFourierMaps, id=G2gd.wxID_FOURCALC) 4939 G2frame.dataFrame.Bind(wx.EVT_MENU, OnSearchMaps, id=G2gd.wxID_FOURSEARCH) 4940 G2frame.dataFrame.Bind(wx.EVT_MENU, OnChargeFlip, id=G2gd.wxID_CHARGEFLIP) 4941 G2frame.dataFrame.Bind(wx.EVT_MENU, OnFourClear, id=G2gd.wxID_FOURCLEAR) 4942 UpdateGeneral() 4943 elif text == 'Data': 4944 G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DataMenu) 4945 FillSelectPageMenu(G2frame.dataFrame.DataMenu) 4946 G2frame.dataFrame.Bind(wx.EVT_MENU, OnPwdrAdd, id=G2gd.wxID_PWDRADD) 4947 G2frame.dataFrame.Bind(wx.EVT_MENU, OnHklfAdd, id=G2gd.wxID_HKLFADD) 4948 G2frame.dataFrame.Bind(wx.EVT_MENU, OnDataDelete, id=G2gd.wxID_DATADELETE) 4949 G2ddG.UpdateDData(G2frame,DData,data) 4950 G2plt.PlotSizeStrainPO(G2frame,data,Start=True) 4951 elif text == 'Atoms': 4940 4952 G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.AtomsMenu) 4941 4953 FillSelectPageMenu(G2frame.dataFrame.AtomsMenu) … … 4954 4966 G2frame.dataFrame.Bind(wx.EVT_MENU, OnReImport, id=id) 4955 4967 FillAtomsGrid(Atoms) 4956 elif text == 'General':4957 G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DataGeneral)4958 FillSelectPageMenu(G2frame.dataFrame.DataGeneral)4959 G2frame.dataFrame.Bind(wx.EVT_MENU, OnFourierMaps, id=G2gd.wxID_FOURCALC)4960 G2frame.dataFrame.Bind(wx.EVT_MENU, OnSearchMaps, id=G2gd.wxID_FOURSEARCH)4961 G2frame.dataFrame.Bind(wx.EVT_MENU, OnChargeFlip, id=G2gd.wxID_CHARGEFLIP)4962 G2frame.dataFrame.Bind(wx.EVT_MENU, OnFourClear, id=G2gd.wxID_FOURCLEAR)4963 UpdateGeneral()4964 elif text == 'Data':4965 G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DataMenu)4966 FillSelectPageMenu(G2frame.dataFrame.DataMenu)4967 G2frame.dataFrame.Bind(wx.EVT_MENU, OnPwdrAdd, id=G2gd.wxID_PWDRADD)4968 G2frame.dataFrame.Bind(wx.EVT_MENU, OnHklfAdd, id=G2gd.wxID_HKLFADD)4969 G2frame.dataFrame.Bind(wx.EVT_MENU, OnDataDelete, id=G2gd.wxID_DATADELETE)4970 G2ddG.UpdateDData(G2frame,DData,data)4971 G2plt.PlotSizeStrainPO(G2frame,data,Start=True)4972 4968 elif text == 'Draw Options': 4973 4969 G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.DataDrawOptions) … … 5007 5003 G2frame.dataFrame.Bind(wx.EVT_MENU, OnRBRemoveAll, id=G2gd.wxID_RBREMOVEALL) 5008 5004 FillRigidBodyGrid() 5009 elif text == 'Pawley reflections':5010 G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.PawleyMenu)5011 FillSelectPageMenu(G2frame.dataFrame.PawleyMenu)5012 G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyLoad, id=G2gd.wxID_PAWLEYLOAD)5013 G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyEstimate, id=G2gd.wxID_PAWLEYESTIMATE)5014 G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyUpdate, id=G2gd.wxID_PAWLEYUPDATE)5015 G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyDelete, id=G2gd.wxID_PAWLEYDELETE)5016 FillPawleyReflectionsGrid()5017 5005 elif text == 'Map peaks': 5018 5006 G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.MapPeaksMenu) … … 5046 5034 UpdateTexture() 5047 5035 G2plt.PlotTexture(G2frame,data,Start=True) 5036 elif text == 'Pawley reflections': 5037 G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.PawleyMenu) 5038 FillSelectPageMenu(G2frame.dataFrame.PawleyMenu) 5039 G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyLoad, id=G2gd.wxID_PAWLEYLOAD) 5040 G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyEstimate, id=G2gd.wxID_PAWLEYESTIMATE) 5041 G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyUpdate, id=G2gd.wxID_PAWLEYUPDATE) 5042 G2frame.dataFrame.Bind(wx.EVT_MENU, OnPawleyDelete, id=G2gd.wxID_PAWLEYDELETE) 5043 FillPawleyReflectionsGrid() 5048 5044 else: 5049 5045 G2gd.SetDataMenuBar(G2frame) … … 5088 5084 G2frame.dataDisplay.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, OnPageChanged) 5089 5085 SetupGeneral() 5090 GeneralData = data['General'] 5091 ChangePage(0) 5086 GeneralData = data['General'] 5087 print 'oldPage',oldPage 5088 if oldPage is None: 5089 UpdateGeneral() 5090 elif oldPage: 5091 G2frame.dataDisplay.SetSelection(oldPage) 5092 else: 5093 UpdateGeneral()
Note: See TracChangeset
for help on using the changeset viewer.