Changeset 2914


Ignore:
Timestamp:
Jul 7, 2017 12:32:09 PM (4 years ago)
Author:
vondreele
Message:

fix G2constrGUI; dataDisplay --> rbBook & fix a parent issue
similarly in G2restrGUI dataDisplay --> restrBook
G2ctrlGUI; missing G2obj import & fix a parent issue on a couple of dialogs
put the wxID definitions into _initMenus - need to be sorted into each section
remove the tree title - redundant info
tree root text changed
G2plot; change dataDisplay to restrBook for torsion & Ramachandran plots
some dataDisplay --> phaseDisplay in various places

Location:
branch/2frame
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branch/2frame/GSASIIconstrGUI.py

    r2913 r2914  
    13741374       
    13751375    def OnImportRigidBody(event):
    1376         page = G2frame.dataDisplay.GetSelection()
    1377         if 'Vector' in G2frame.dataDisplay.GetPageText(page):
     1376        page = G2frame.rbBook.GetSelection()
     1377        if 'Vector' in G2frame.rbBook.GetPageText(page):
    13781378            pass
    1379         elif 'Residue' in G2frame.dataDisplay.GetPageText(page):
     1379        elif 'Residue' in G2frame.rbBook.GetPageText(page):
    13801380            ImportResidueRB()
    13811381           
    13821382    def AddVectorRB(event):
    13831383        AtInfo = data['Vector']['AtInfo']
    1384         dlg = MultiIntegerDialog(G2frame.dataDisplay,'New Rigid Body',['No. atoms','No. translations'],[1,1])
     1384        dlg = MultiIntegerDialog(G2frame,'New Rigid Body',['No. atoms','No. translations'],[1,1])
    13851385        if dlg.ShowModal() == wx.ID_OK:
    13861386            nAtoms,nTrans = dlg.GetValues()
  • branch/2frame/GSASIIctrlGUI.py

    r2913 r2914  
    3434import GSASIIpy3 as G2py3
    3535import GSASIIlog as log
     36import GSASIIobj as G2obj
    3637
    3738# Define a short names for convenience
     
    16011602        G2frame.ErrorDialog('No match','No histograms match '+hst,G2frame)
    16021603        return
    1603     dlg = wx.Dialog(G2frame.dataDisplay,wx.ID_ANY,'Set a parameter value',
     1604    dlg = wx.Dialog(G2frame,wx.ID_ANY,'Set a parameter value',
    16041605        style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
    16051606    mainSizer = wx.BoxSizer(wx.VERTICAL)
     
    17011702    if copyopts['InTable']:
    17021703        dlg = ScrolledMultiEditor(
    1703             G2frame.dataDisplay,dictlst,
     1704            G2frame,dictlst,
    17041705            len(dictlst)*[keyLst[-1]],prelbl,
    17051706            header='Editing parameter '+lbl,
     
    29682969
    29692970        if self.panel.GetSizer(): self.panel.GetSizer().Clear(True)
    2970         mainSizer = self.panel.GetSizer()
     2971        mainSizer = wx.BoxSizer(wx.VERTICAL)
    29712972        num = len(self.varyList)
    29722973        mainSizer.Add(wx.StaticText(self.panel,label=' Number of refined variables: '+str(num)),0)
  • branch/2frame/GSASIIdataGUI.py

    r2913 r2914  
    7777            continue
    7878        exec('global '+arg+';'+arg+' = wx.NewId()')
    79 
    80 # probably a good idea to move these to where they are used for cleaner code
    81 Define_wxId('wxID_FOURCALC', 'wxID_FOURSEARCH', 'wxID_FOURCLEAR', 'wxID_PEAKSMOVE', 'wxID_PEAKSCLEAR',
    82     'wxID_CHARGEFLIP', 'wxID_PEAKSUNIQUE', 'wxID_PEAKSDELETE', 'wxID_PEAKSDA',
    83     'wxID_PEAKSDISTVP', 'wxID_PEAKSVIEWPT', 'wxID_FINDEQVPEAKS', 'wxID_SHOWBONDS', 'wxID_MULTIMCSA',
    84     'wxID_SINGLEMCSA', 'wxID_4DCHARGEFLIP', 'wxID_TRANSFORMSTRUCTURE',)
    85 
    86 Define_wxId('wxID_PWDRADD', 'wxID_HKLFADD', 'wxID_PWDANALYSIS', 'wxID_PWDCOPY', 'wxID_PLOTCTRLCOPY',
    87     'wxID_DATADELETE', 'wxID_DATACOPY', 'wxID_DATACOPYFLAGS', 'wxID_DATASELCOPY', 'wxID_DATAUSE',)
    88 
    89 Define_wxId('wxID_ATOMSEDITADD', 'wxID_ATOMSEDITINSERT', 'wxID_ATOMSEDITDELETE',
    90     'wxID_ATOMSMODIFY', 'wxID_ATOMSTRANSFORM', 'wxID_ATOMSVIEWADD', 'wxID_ATOMVIEWINSERT',
    91     'wxID_RELOADDRAWATOMS', 'wxID_ATOMSDISAGL', 'wxID_ATOMMOVE', 'wxID_MAKEMOLECULE',
    92     'wxID_ASSIGNATMS2RB', 'wxID_ATOMSPDISAGL', 'wxID_ISODISP', 'wxID_ADDHATOM', 'wxID_UPDATEHATOM',
    93     'wxID_WAVEVARY', 'wxID_ATOMSROTATE', 'wxID_ATOMSDENSITY', 'wxID_VALIDPROTEIN',
    94     'wxID_ATOMSSETALL', 'wxID_ATOMSSETSEL',)
    95 
    96 Define_wxId('wxID_DRAWATOMSTYLE', 'wxID_DRAWATOMLABEL', 'wxID_DRAWATOMCOLOR', 'wxID_DRAWATOMRESETCOLOR',
    97     'wxID_DRAWVIEWPOINT', 'wxID_DRAWTRANSFORM', 'wxID_DRAWDELETE', 'wxID_DRAWFILLCELL',
    98     'wxID_DRAWADDEQUIV', 'wxID_DRAWFILLCOORD', 'wxID_DRAWDISAGLTOR', ' wxID_DRAWPLANE',
    99     'wxID_DRAWDISTVP', 'wxID_DRAWADDSPHERE', 'wxID_DRWAEDITRADII',)
    100 
    101 Define_wxId('wxID_DRAWRESTRBOND', 'wxID_DRAWRESTRANGLE', 'wxID_DRAWRESTRPLANE', 'wxID_DRAWRESTRCHIRAL',)
    102 
    103 Define_wxId('wxID_ADDMCSAATOM', 'wxID_ADDMCSARB', 'wxID_CLEARMCSARB', 'wxID_MOVEMCSA', 'wxID_MCSACLEARRESULTS',)
    104 
    105 Define_wxId('wxID_CLEARTEXTURE', 'wxID_REFINETEXTURE',)
    106 
    107 Define_wxId('wxID_LOADDIFFAX', 'wxID_LAYERSIMULATE', 'wxID_SEQUENCESIMULATE', 'wxID_LAYERSFIT', 'wxID_COPYPHASE',)
    108 
    109 Define_wxId('wxID_PAWLEYLOAD', 'wxID_PAWLEYESTIMATE', 'wxID_PAWLEYUPDATE', 'wxID_PAWLEYSELALL', 'wxID_PAWLEYSELNONE',
    110   'wxID_PAWLEYSELTOGGLE', 'wxID_PAWLEYSET',)
    111 
    112 Define_wxId('wxID_IMCALIBRATE', 'wxID_IMRECALIBRATE', 'wxID_IMINTEGRATE', 'wxID_IMCLEARCALIB', 'wxID_IMRECALIBALL',
    113     'wxID_IMCOPYCONTROLS', 'wxID_INTEGRATEALL', 'wxID_IMSAVECONTROLS', 'wxID_IMLOADCONTROLS', 'wxID_IMAUTOINTEG',
    114     'wxID_IMCOPYSELECTED', 'wxID_SAVESELECTEDCONTROLS', 'wxID_IMXFERCONTROLS', 'wxID_IMRESETDIST',)
    115 
    116 Define_wxId('wxID_MASKCOPY', 'wxID_MASKSAVE', 'wxID_MASKLOAD', 'wxID_NEWMASKSPOT', 'wxID_NEWMASKARC', 'wxID_NEWMASKRING',
    117     'wxID_NEWMASKFRAME', 'wxID_NEWMASKPOLY', 'wxID_MASKLOADNOT', 'wxID_FINDSPOTS', 'wxID_DELETESPOTS',)
    118 
    119 Define_wxId('wxID_STRSTACOPY', 'wxID_STRSTAFIT', 'wxID_STRSTASAVE', 'wxID_STRSTALOAD', 'wxID_STRSTSAMPLE',
    120     'wxID_APPENDDZERO', 'wxID_STRSTAALLFIT', 'wxID_UPDATEDZERO', 'wxID_STRSTAPLOT', 'wxID_STRRINGSAVE',)
    121 
    122 Define_wxId('wxID_BACKCOPY', 'wxID_LIMITCOPY', 'wxID_SAMPLECOPY', 'wxID_SAMPLECOPYSOME', 'wxID_BACKFLAGCOPY', 'wxID_SAMPLEFLAGCOPY',
    123     'wxID_SAMPLESAVE', 'wxID_SAMPLELOAD', 'wxID_ADDEXCLREGION', 'wxID_SETSCALE', 'wxID_SAMPLE1VAL', 'wxID_ALLSAMPLELOAD',
    124     'wxID_MAKEBACKRDF', 'wxID_RESCALEALL',)
    125 
    126 Define_wxId('wxID_INSTPRMRESET', 'wxID_CHANGEWAVETYPE', 'wxID_INSTCOPY', 'wxID_INSTFLAGCOPY', 'wxID_INSTLOAD',
    127     'wxID_INSTSAVE', 'wxID_INST1VAL', 'wxID_INSTCALIB', 'wxID_INSTSAVEALL',)
    128 
    129 Define_wxId('wxID_UNDO', 'wxID_LSQPEAKFIT', 'wxID_LSQONECYCLE', 'wxID_RESETSIGGAM', 'wxID_CLEARPEAKS', 'wxID_AUTOSEARCH',
    130     'wxID_PEAKSCOPY', 'wxID_SEQPEAKFIT',)
    131 
    132 Define_wxId(' wxID_INDXRELOAD', 'wxID_INDEXPEAKS', 'wxID_REFINECELL', 'wxID_COPYCELL', 'wxID_MAKENEWPHASE',
    133     'wxID_EXPORTCELLS',)
    134 
    135 Define_wxId('wxID_CONSTRAINTADD', 'wxID_EQUIVADD', 'wxID_HOLDADD', 'wxID_FUNCTADD', 'wxID_ADDRIDING',
    136   'wxID_CONSPHASE', 'wxID_CONSHIST', 'wxID_CONSHAP', 'wxID_CONSGLOBAL', 'wxID_EQUIVALANCEATOMS',)
    137 
    138 Define_wxId('wxID_RESTRAINTADD', 'wxID_RESTSELPHASE', 'wxID_RESTDELETE', 'wxID_RESRCHANGEVAL',
    139     'wxID_RESTCHANGEESD', 'wxID_AARESTRAINTADD', 'wxID_AARESTRAINTPLOT',)
    140 
    141 Define_wxId('wxID_RIGIDBODYADD', 'wxID_DRAWDEFINERB', 'wxID_RIGIDBODYIMPORT', 'wxID_RESIDUETORSSEQ',
    142     'wxID_AUTOFINDRESRB', 'wxID_GLOBALRESREFINE', 'wxID_RBREMOVEALL', 'wxID_COPYRBPARMS',
    143     'wxID_GLOBALTHERM', 'wxID_VECTORBODYADD')
    144 
    145 Define_wxId('wxID_RENAMESEQSEL', 'wxID_SAVESEQSEL', 'wxID_SAVESEQSELCSV', 'wxID_SAVESEQCSV', 'wxID_PLOTSEQSEL',
    146   'wxID_ORGSEQSEL', 'wxADDSEQVAR', 'wxDELSEQVAR', 'wxEDITSEQVAR', 'wxCOPYPARFIT', 'wxID_AVESEQSEL',
    147   'wxADDPARFIT', 'wxDELPARFIT', 'wxEDITPARFIT', 'wxDOPARFIT', 'wxADDSEQDIST', 'wxADDSEQANGLE', 'wxID_ORGSEQINC',)
    148 
    149 Define_wxId('wxID_MODELCOPY', 'wxID_MODELFIT', 'wxID_MODELADD', 'wxID_ELEMENTADD', 'wxID_ELEMENTDELETE',
    150     'wxID_ADDSUBSTANCE', 'wxID_LOADSUBSTANCE', 'wxID_DELETESUBSTANCE', 'wxID_COPYSUBSTANCE',
    151     'wxID_MODELUNDO', 'wxID_MODELFITALL', 'wxID_MODELCOPYFLAGS', 'wxID_RELOADSUBSTANCES',
    152     'wxID_MODELPLOT',)
    153 
    154 Define_wxId('wxID_SELECTPHASE', 'wxID_PWDHKLPLOT', 'wxID_PWD3DHKLPLOT', 'wxID_3DALLHKLPLOT', 'wxID_MERGEHKL',)
    155 
    156 Define_wxId('wxID_PDFCOPYCONTROLS', 'wxID_PDFSAVECONTROLS', 'wxID_PDFLOADCONTROLS', 'wxID_PDFCOMPUTE',
    157     'wxID_PDFCOMPUTEALL', 'wxID_PDFADDELEMENT', 'wxID_PDFDELELEMENT', 'wxID_PDFPKSFIT',
    158     'wxID_PDFPKSFITALL', 'wxID_PDFCOPYPEAKS', 'wxID_CLEARPDFPEAKS',)
    159 
    160 Define_wxId('wxID_MCRON', 'wxID_MCRLIST', 'wxID_MCRSAVE', 'wxID_MCRPLAY',)
    161 
    16279
    16380def SetDefaultDData(dType,histoName,NShkl=0,NDij=0):
     
    29442861        self.GPXtree = G2G.G2TreeCtrl(id=wxID_PATTERNTREE,
    29452862            parent=self.treePanel, size=self.treePanel.GetClientSize(),style=wx.TR_DEFAULT_STYLE )
    2946         self.treeTitle = wx.StaticText(self.treePanel, wx.ID_ANY, "GSAS-II data tree",
    2947                                        )
    2948         self.treeTitle.SetBackgroundColour(DULL_YELLOW) # add some yellow to the title
    2949         treeSizer.Add(self.treeTitle,0,wx.EXPAND|wx.ALL,0)
     2863#        self.treeTitle = wx.StaticText(self.treePanel, wx.ID_ANY, "GSAS-II project: ",
     2864#                                       )
     2865#        self.treeTitle.SetBackgroundColour(wx.Colour(230,230,150)) # add some yellow to the title
     2866#        treeSizer.Add(self.treeTitle,0,wx.EXPAND|wx.ALL,0)
    29502867        treeSizer.Add(self.GPXtree,1,wx.EXPAND|wx.ALL,0)
    29512868        self.GPXtree.Bind(wx.EVT_TREE_SEL_CHANGED,self.OnDataTreeSelChanged)
     
    32153132        '''
    32163133        if location == 1:
    3217             self.treeTitle.SetLabel(text)
     3134#            self.treeTitle.SetLabel(text)
     3135            pass
    32183136        elif not location:
    32193137            wx.Frame.SetTitle(self,text)
     
    39023820        phaseId = None
    39033821        G2IO.ProjFileOpen(self)
    3904         self.GPXtree.SetItemText(self.root,'Loaded Data: '+self.GSASprojectfile)
     3822        self.GPXtree.SetItemText(self.root,'Project: '+self.GSASprojectfile)
    39053823        self.GPXtree.Expand(self.root)
    39063824        self.HKL = []
     
    39443862            if result != wx.ID_CANCEL:
    39453863                self.GSASprojectfile = ''
    3946                 self.GPXtree.SetItemText(self.root,'Loaded Data: ')
     3864                self.GPXtree.SetItemText(self.root,'Project: ')
    39473865                self.GPXtree.DeleteChildren(self.root)
    39483866                if self.HKL: self.HKL = []
     
    39583876       
    39593877        if self.GSASprojectfile:
    3960             self.GPXtree.SetItemText(self.root,'Loaded Data: '+self.GSASprojectfile)
     3878            self.GPXtree.SetItemText(self.root,'Project: '+self.GSASprojectfile)
    39613879            self.CheckNotebook()
    39623880            G2IO.ProjFileSave(self)
     
    39813899                self.GSASprojectfile = dlg.GetPath()
    39823900                self.GSASprojectfile = G2IO.FileDlgFixExt(dlg,self.GSASprojectfile)
    3983                 self.GPXtree.SetItemText(self.root,'Saving project as'+self.GSASprojectfile)
     3901                self.GPXtree.SetItemText(self.root,'Project: '+self.GSASprojectfile)
    39843902                #self.SetTitle("GSAS-II data tree: "+os.path.split(self.GSASprojectfile)[1])
    3985                 self.SetTitle("GSAS-II data tree: "+os.path.split(self.GSASprojectfile)[1],1)
     3903                self.SetTitle("GSAS-II project: "+os.path.split(self.GSASprojectfile)[1],1)
    39863904                self.CheckNotebook()
    39873905                G2IO.ProjFileSave(self)
     
    48094727        'define all GSAS-II data window menus'
    48104728       
     4729        Define_wxId('wxID_ADDMCSAATOM', 'wxID_ADDMCSARB', 'wxID_CLEARMCSARB', 'wxID_MOVEMCSA', 'wxID_MCSACLEARRESULTS',)
     4730       
     4731        Define_wxId('wxID_CLEARTEXTURE', 'wxID_REFINETEXTURE',)
     4732       
     4733        Define_wxId('wxID_LOADDIFFAX', 'wxID_LAYERSIMULATE', 'wxID_SEQUENCESIMULATE', 'wxID_LAYERSFIT', 'wxID_COPYPHASE',)
     4734       
     4735        Define_wxId('wxID_PAWLEYLOAD', 'wxID_PAWLEYESTIMATE', 'wxID_PAWLEYUPDATE', 'wxID_PAWLEYSELALL', 'wxID_PAWLEYSELNONE',
     4736          'wxID_PAWLEYSELTOGGLE', 'wxID_PAWLEYSET',)
     4737       
     4738        Define_wxId('wxID_BACKCOPY', 'wxID_LIMITCOPY', 'wxID_SAMPLECOPY', 'wxID_SAMPLECOPYSOME', 'wxID_BACKFLAGCOPY', 'wxID_SAMPLEFLAGCOPY',
     4739            'wxID_SAMPLESAVE', 'wxID_SAMPLELOAD', 'wxID_ADDEXCLREGION', 'wxID_SETSCALE', 'wxID_SAMPLE1VAL', 'wxID_ALLSAMPLELOAD',
     4740            'wxID_MAKEBACKRDF', 'wxID_RESCALEALL',)
     4741       
     4742        Define_wxId('wxID_INSTPRMRESET', 'wxID_CHANGEWAVETYPE', 'wxID_INSTCOPY', 'wxID_INSTFLAGCOPY', 'wxID_INSTLOAD',
     4743            'wxID_INSTSAVE', 'wxID_INST1VAL', 'wxID_INSTCALIB', 'wxID_INSTSAVEALL',)
     4744       
     4745        Define_wxId('wxID_UNDO', 'wxID_LSQPEAKFIT', 'wxID_LSQONECYCLE', 'wxID_RESETSIGGAM', 'wxID_CLEARPEAKS', 'wxID_AUTOSEARCH',
     4746            'wxID_PEAKSCOPY', 'wxID_SEQPEAKFIT',)
     4747       
     4748        Define_wxId(' wxID_INDXRELOAD', 'wxID_INDEXPEAKS', 'wxID_REFINECELL', 'wxID_COPYCELL', 'wxID_MAKENEWPHASE',
     4749            'wxID_EXPORTCELLS',)
     4750       
     4751        Define_wxId('wxID_CONSTRAINTADD', 'wxID_EQUIVADD', 'wxID_HOLDADD', 'wxID_FUNCTADD', 'wxID_ADDRIDING',
     4752          'wxID_CONSPHASE', 'wxID_CONSHIST', 'wxID_CONSHAP', 'wxID_CONSGLOBAL', 'wxID_EQUIVALANCEATOMS',)
     4753       
     4754        Define_wxId('wxID_SELECTPHASE', 'wxID_PWDHKLPLOT', 'wxID_PWD3DHKLPLOT', 'wxID_3DALLHKLPLOT', 'wxID_MERGEHKL',)
     4755       
     4756        Define_wxId('wxID_MCRON', 'wxID_MCRLIST', 'wxID_MCRSAVE', 'wxID_MCRPLAY',)
     4757
     4758        Define_wxId('wxID_PWDRADD', 'wxID_HKLFADD', 'wxID_PWDANALYSIS', 'wxID_PWDCOPY', 'wxID_PLOTCTRLCOPY',
     4759            'wxID_DATADELETE', 'wxID_DATACOPY', 'wxID_DATACOPYFLAGS', 'wxID_DATASELCOPY', 'wxID_DATAUSE',)
     4760
     4761        Define_wxId('wxID_FOURCALC', 'wxID_FOURSEARCH', 'wxID_FOURCLEAR', 'wxID_PEAKSMOVE', 'wxID_PEAKSCLEAR',
     4762            'wxID_CHARGEFLIP', 'wxID_PEAKSUNIQUE', 'wxID_PEAKSDELETE', 'wxID_PEAKSDA',
     4763            'wxID_PEAKSDISTVP', 'wxID_PEAKSVIEWPT', 'wxID_FINDEQVPEAKS', 'wxID_SHOWBONDS', 'wxID_MULTIMCSA',
     4764            'wxID_SINGLEMCSA', 'wxID_4DCHARGEFLIP', 'wxID_TRANSFORMSTRUCTURE',)
     4765
    48114766        # Main menu
    48124767        G2frame = self.GetTopLevelParent()
     
    48714826
    48724827        # Rigid bodies
     4828        Define_wxId('wxID_RIGIDBODYADD', 'wxID_DRAWDEFINERB', 'wxID_RIGIDBODYIMPORT', 'wxID_RESIDUETORSSEQ',
     4829            'wxID_AUTOFINDRESRB', 'wxID_GLOBALRESREFINE', 'wxID_RBREMOVEALL', 'wxID_COPYRBPARMS',
     4830            'wxID_GLOBALTHERM', 'wxID_VECTORBODYADD')
     4831       
    48734832        self.RigidBodyMenu = wx.MenuBar()
    48744833        self.PrefillDataMenu(self.RigidBodyMenu)
     
    48914850        self.PostfillDataMenu()
    48924851
    4893                    
    48944852        # Restraints
     4853        Define_wxId('wxID_RESTRAINTADD', 'wxID_RESTSELPHASE', 'wxID_RESTDELETE', 'wxID_RESRCHANGEVAL',
     4854            'wxID_RESTCHANGEESD', 'wxID_AARESTRAINTADD', 'wxID_AARESTRAINTPLOT',)
     4855
    48954856        self.RestraintTab = wx.Menu(title='')
    48964857        self.RestraintEdit = wx.Menu(title='')
     
    49204881           
    49214882        # Sequential results
     4883        Define_wxId('wxID_RENAMESEQSEL', 'wxID_SAVESEQSEL', 'wxID_SAVESEQCSV', 'wxID_SAVESEQSELCSV', 'wxID_PLOTSEQSEL',
     4884          'wxID_ORGSEQSEL', 'wxADDSEQVAR', 'wxDELSEQVAR', 'wxEDITSEQVAR', 'wxCOPYPARFIT', 'wxID_AVESEQSEL',
     4885          'wxADDPARFIT', 'wxDELPARFIT', 'wxEDITPARFIT', 'wxDOPARFIT', 'wxADDSEQDIST', 'wxADDSEQANGLE', 'wxID_ORGSEQINC',)
     4886
    49224887        self.SequentialMenu = wx.MenuBar()
    49234888        self.PrefillDataMenu(self.SequentialMenu)
     
    52345199       
    52355200        #SASD & REFL/ Substance editor
     5201        Define_wxId('wxID_MODELCOPY', 'wxID_MODELFIT', 'wxID_MODELADD', 'wxID_ELEMENTADD', 'wxID_ELEMENTDELETE',
     5202            'wxID_ADDSUBSTANCE', 'wxID_LOADSUBSTANCE', 'wxID_DELETESUBSTANCE', 'wxID_COPYSUBSTANCE',
     5203            'wxID_MODELUNDO', 'wxID_MODELFITALL', 'wxID_MODELCOPYFLAGS', 'wxID_RELOADSUBSTANCES',
     5204            'wxID_MODELPLOT',)
     5205   
    52365206        self.SubstanceMenu = wx.MenuBar()
    52375207        self.PrefillDataMenu(self.SubstanceMenu)
     
    52935263
    52945264        # IMG / Image Controls
     5265        Define_wxId('wxID_IMCALIBRATE', 'wxID_IMRECALIBRATE', 'wxID_IMINTEGRATE', 'wxID_IMCLEARCALIB', 'wxID_IMRECALIBALL',
     5266            'wxID_IMCOPYCONTROLS', 'wxID_INTEGRATEALL', 'wxID_IMSAVECONTROLS', 'wxID_IMLOADCONTROLS', 'wxID_IMAUTOINTEG',
     5267            'wxID_IMCOPYSELECTED', 'wxID_SAVESELECTEDCONTROLS', 'wxID_IMXFERCONTROLS', 'wxID_IMRESETDIST',)
     5268
    52955269        self.ImageMenu = wx.MenuBar()
    52965270        self.PrefillDataMenu(self.ImageMenu)
     
    53355309           
    53365310        # IMG / Masks
     5311        Define_wxId('wxID_MASKCOPY', 'wxID_MASKSAVE', 'wxID_MASKLOAD', 'wxID_NEWMASKSPOT', 'wxID_NEWMASKARC', 'wxID_NEWMASKRING',
     5312            'wxID_NEWMASKFRAME', 'wxID_NEWMASKPOLY', 'wxID_MASKLOADNOT', 'wxID_FINDSPOTS', 'wxID_DELETESPOTS',)
     5313
    53375314        self.MaskMenu = wx.MenuBar()
    53385315        self.PrefillDataMenu(self.MaskMenu)
     
    53695346           
    53705347        # IMG / Stress/Strain
     5348        Define_wxId('wxID_STRSTACOPY', 'wxID_STRSTAFIT', 'wxID_STRSTASAVE', 'wxID_STRSTALOAD', 'wxID_STRSTSAMPLE',
     5349            'wxID_APPENDDZERO', 'wxID_STRSTAALLFIT', 'wxID_UPDATEDZERO', 'wxID_STRSTAPLOT', 'wxID_STRRINGSAVE',)
     5350       
    53715351        self.StrStaMenu = wx.MenuBar()
    53725352        self.PrefillDataMenu(self.StrStaMenu)
     
    53965376           
    53975377        # PDF / PDF Controls
     5378        Define_wxId('wxID_PDFCOPYCONTROLS', 'wxID_PDFSAVECONTROLS', 'wxID_PDFLOADCONTROLS', 'wxID_PDFCOMPUTE',
     5379            'wxID_PDFCOMPUTEALL', 'wxID_PDFADDELEMENT', 'wxID_PDFDELELEMENT', 'wxID_PDFPKSFIT',
     5380            'wxID_PDFPKSFITALL', 'wxID_PDFCOPYPEAKS', 'wxID_CLEARPDFPEAKS',)
     5381
    53985382        self.PDFMenu = wx.MenuBar()
    53995383        self.PrefillDataMenu(self.PDFMenu)
     
    54345418        self.PostfillDataMenu()
    54355419
    5436        
    54375420        # Phase / General tab
    54385421        self.DataGeneral = wx.MenuBar()
     
    54835466           
    54845467        # Phase / Atoms tab
     5468        Define_wxId('wxID_ATOMSEDITADD', 'wxID_ATOMSEDITINSERT', 'wxID_ATOMSEDITDELETE',
     5469            'wxID_ATOMSMODIFY', 'wxID_ATOMSTRANSFORM', 'wxID_ATOMSVIEWADD', 'wxID_ATOMVIEWINSERT',
     5470            'wxID_RELOADDRAWATOMS', 'wxID_ATOMSDISAGL', 'wxID_ATOMMOVE', 'wxID_MAKEMOLECULE',
     5471            'wxID_ASSIGNATMS2RB', 'wxID_ATOMSPDISAGL', 'wxID_ISODISP', 'wxID_ADDHATOM', 'wxID_UPDATEHATOM',
     5472            'wxID_WAVEVARY', 'wxID_ATOMSROTATE', 'wxID_ATOMSDENSITY', 'wxID_VALIDPROTEIN',
     5473            'wxID_ATOMSSETALL', 'wxID_ATOMSSETSEL',)
     5474
    54855475        self.AtomsMenu = wx.MenuBar()
    54865476        self.PrefillDataMenu(self.AtomsMenu)
     
    55935583       
    55945584        # Phase / Draw Atoms tab
     5585        Define_wxId('wxID_DRAWATOMSTYLE', 'wxID_DRAWATOMLABEL', 'wxID_DRAWATOMCOLOR', 'wxID_DRAWATOMRESETCOLOR',
     5586            'wxID_DRAWVIEWPOINT', 'wxID_DRAWTRANSFORM', 'wxID_DRAWDELETE', 'wxID_DRAWFILLCELL',
     5587            'wxID_DRAWADDEQUIV', 'wxID_DRAWFILLCOORD', 'wxID_DRAWDISAGLTOR', ' wxID_DRAWPLANE',
     5588            'wxID_DRAWDISTVP', 'wxID_DRAWADDSPHERE', 'wxID_DRWAEDITRADII',)
     5589        Define_wxId('wxID_DRAWRESTRBOND', 'wxID_DRAWRESTRANGLE', 'wxID_DRAWRESTRPLANE', 'wxID_DRAWRESTRCHIRAL',)
     5590       
    55955591        self.DrawAtomsMenu = wx.MenuBar()
    55965592        self.PrefillDataMenu(self.DrawAtomsMenu)
  • branch/2frame/GSASIIplot.py

    r2913 r2914  
    40644064        except:
    40654065            return
    4066         if G2frame.dataDisplay.GetPageText(page) == 'Torsion restraints':
    4067             torGrid = G2frame.dataDisplay.GetPage(page).Torsions
     4066        if G2frame.restrBook.GetPageText(page) == 'Torsion restraints':
     4067            torGrid = G2frame.restrBook.GetPage(page).Torsions
    40684068            torGrid.ClearSelection()
    40694069            for row in range(torGrid.GetNumberRows()):
     
    41294129            dlg.Destroy()
    41304130        PlotRama(G2frame,phaseName,Rama,RamaName,Names,PhiPsi,Coeff)
     4131       
    41314132    def OnPick(event):
    41324133        ind = event.ind[0]
     
    41344135        Page.canvas.SetToolTipString(msg)
    41354136        try:
    4136             page = G2frame.dataDisplay.GetSelection()
     4137            page = G2frame.restrBook.GetSelection()
    41374138        except:
    41384139            return
    4139         if G2frame.dataDisplay.GetPageText(page) == 'Ramachandran restraints':
    4140             ramaGrid = G2frame.dataDisplay.GetPage(page).Ramas
     4140        if G2frame.restrBook.GetPageText(page) == 'Ramachandran restraints':
     4141            ramaGrid = G2frame.restrBook.GetPage(page).Ramas
    41414142            ramaGrid.ClearSelection()
    41424143            for row in range(ramaGrid.GetNumberRows()):
     
    58105811        if page:
    58115812            if G2frame.phaseDisplay.GetPageText(page) == 'Draw Options':
    5812                 G2frame.dataDisplay.viewDir.SetValue('%.3f %.3f %.3f'%(VD[0],VD[1],VD[2]))
     5813                G2frame.phaseDisplay.viewDir.SetValue('%.3f %.3f %.3f'%(VD[0],VD[1],VD[2]))
    58135814               
    58145815    def SetMapPeaksText(mapPeaks):
     
    58185819            if G2frame.phaseDisplay.GetPageText(page) == 'Map peaks':
    58195820                G2frame.MapPeaksTable.SetData(data['Map Peaks'])
    5820                 panel = G2frame.dataDisplay.GetPage(page).GetChildren()
     5821                panel = G2frame.phaseDisplay.GetPage(page).GetChildren()
    58215822                names = [child.GetName() for child in panel]
    58225823                try:
     
    58335834                    table[i][2:5] = atom[2:5]
    58345835                G2frame.atomTable.SetData(table)
    5835                 panel = G2frame.dataDisplay.GetPage(page).GetChildren()
     5836                panel = G2frame.phaseDisplay.GetPage(page).GetChildren()
    58365837                names = [child.GetName() for child in panel]
    58375838                try:
     
    66366637#        page = getSelection()
    66376638#        if page:
    6638 #            if G2frame.dataDisplay.GetPageText(page) == 'Rigid bodies':
     6639#            if G2frame.GetPageText(page) == 'Rigid bodies':
    66396640#                G2frame.MapPeaksTable.SetData(mapPeaks)
    6640 #                panel = G2frame.dataDisplay.GetPage(page).GetChildren()
     6641#                panel = G2frame.GetPage(page).GetChildren()
    66416642#                names = [child.GetName() for child in panel]
    66426643#                panel[names.index('grid window')].Refresh()
  • branch/2frame/GSASIIrestrGUI.py

    r2913 r2914  
    8585       
    8686    def OnPlotAARestraint(event):
    87         page = G2frame.dataDisplay.GetSelection()
    88         if 'Torsion' in G2frame.dataDisplay.GetPageText(page):
     87        page = G2frame.restrBook.GetSelection()
     88        if 'Torsion' in G2frame.restrBook.GetPageText(page):
    8989            torNames = []
    9090            torNames += restrData['Torsion']['Coeff'].keys()
     
    112112                dlg.Destroy()
    113113           
    114         elif 'Rama' in G2frame.dataDisplay.GetPageText(page):
     114        elif 'Rama' in G2frame.restrBook.GetPageText(page):
    115115            ramaNames = ['All',]
    116116            ramaNames += restrData['Rama']['Coeff'].keys()
Note: See TracChangeset for help on using the changeset viewer.