Ignore:
Timestamp:
Jul 7, 2017 4:45:18 PM (4 years ago)
Author:
toby
Message:

massive changes of wxID_ ids & misc to fix undefined vars wanings

File:
1 edited

Legend:

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

    r2915 r2917  
    10841084        G2frame.constr.ChangeSelection(page)
    10851085        text = G2frame.constr.GetPageText(page)
    1086         G2frame.dataWindow.ConstraintEdit.Enable(G2gd.wxID_EQUIVALANCEATOMS,False)
    1087 #        G2frame.dataWindow.ConstraintEdit.Enable(G2gd.wxID_ADDRIDING,False)
     1086        G2frame.dataWindow.ConstraintEdit.Enable(G2G.wxID_EQUIVALANCEATOMS,False)
     1087#        G2frame.dataWindow.ConstraintEdit.Enable(G2G.wxID_ADDRIDING,False)
    10881088        if text == 'Histogram/Phase':
    10891089            G2frame.Page = [page,'hap']
     
    10941094        elif text == 'Phase':
    10951095            G2frame.Page = [page,'phs']
    1096             G2frame.dataWindow.ConstraintEdit.Enable(G2gd.wxID_EQUIVALANCEATOMS,True)
    1097 #            G2frame.dataWindow.ConstraintEdit.Enable(G2gd.wxID_ADDRIDING,True)
     1096            G2frame.dataWindow.ConstraintEdit.Enable(G2G.wxID_EQUIVALANCEATOMS,True)
     1097#            G2frame.dataWindow.ConstraintEdit.Enable(G2G.wxID_ADDRIDING,True)
    10981098            if 'DELETED' in str(PhaseConstr):   #seems to be no other way to do this (wx bug)
    10991099                if GSASIIpath.GetConfigValue('debug'):
     
    11081108        'Respond to a "select tab" menu button'
    11091109        try:
    1110             i = (G2gd.wxID_CONSPHASE,
    1111                  G2gd.wxID_CONSHAP,
    1112                  G2gd.wxID_CONSHIST,
    1113                  G2gd.wxID_CONSGLOBAL).index(event.GetId())
     1110            i = (G2G.wxID_CONSPHASE,
     1111                 G2G.wxID_CONSHAP,
     1112                 G2G.wxID_CONSHIST,
     1113                 G2G.wxID_CONSGLOBAL).index(event.GetId())
    11141114            G2frame.constr.SetSelection(i)
    11151115            wx.CallAfter(OnPageChanged,None)
     
    11251125    SetStatusLine('')
    11261126   
    1127     G2frame.Bind(wx.EVT_MENU, OnAddConstraint, id=G2gd.wxID_CONSTRAINTADD)
    1128     G2frame.Bind(wx.EVT_MENU, OnAddFunction, id=G2gd.wxID_FUNCTADD)
    1129     G2frame.Bind(wx.EVT_MENU, OnAddEquivalence, id=G2gd.wxID_EQUIVADD)
    1130     G2frame.Bind(wx.EVT_MENU, OnAddHold, id=G2gd.wxID_HOLDADD)
    1131     G2frame.Bind(wx.EVT_MENU, OnAddAtomEquiv, id=G2gd.wxID_EQUIVALANCEATOMS)
    1132 #    G2frame.Bind(wx.EVT_MENU, OnAddRiding, id=G2gd.wxID_ADDRIDING)
     1127    G2frame.Bind(wx.EVT_MENU, OnAddConstraint, id=G2G.wxID_CONSTRAINTADD)
     1128    G2frame.Bind(wx.EVT_MENU, OnAddFunction, id=G2G.wxID_FUNCTADD)
     1129    G2frame.Bind(wx.EVT_MENU, OnAddEquivalence, id=G2G.wxID_EQUIVADD)
     1130    G2frame.Bind(wx.EVT_MENU, OnAddHold, id=G2G.wxID_HOLDADD)
     1131    G2frame.Bind(wx.EVT_MENU, OnAddAtomEquiv, id=G2G.wxID_EQUIVALANCEATOMS)
     1132#    G2frame.Bind(wx.EVT_MENU, OnAddRiding, id=G2G.wxID_ADDRIDING)
    11331133    # tab commands
    1134     for id in (G2gd.wxID_CONSPHASE,
    1135                G2gd.wxID_CONSHAP,
    1136                G2gd.wxID_CONSHIST,
    1137                G2gd.wxID_CONSGLOBAL):
     1134    for id in (G2G.wxID_CONSPHASE,
     1135               G2G.wxID_CONSHAP,
     1136               G2G.wxID_CONSHIST,
     1137               G2G.wxID_CONSGLOBAL):
    11381138        G2frame.Bind(wx.EVT_MENU, RaisePage,id=id)
    11391139
     
    13231323        if text == 'Vector rigid bodies':
    13241324            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.VectorBodyMenu)
    1325             G2frame.Bind(wx.EVT_MENU, AddVectorRB, id=G2gd.wxID_VECTORBODYADD)
     1325            G2frame.Bind(wx.EVT_MENU, AddVectorRB, id=G2G.wxID_VECTORBODYADD)
    13261326            G2frame.Page = [page,'vrb']
    13271327            UpdateVectorRB()
    13281328        elif text == 'Residue rigid bodies':
    13291329            G2gd.SetDataMenuBar(G2frame,G2frame.dataWindow.RigidBodyMenu)
    1330             G2frame.Bind(wx.EVT_MENU, AddResidueRB, id=G2gd.wxID_RIGIDBODYADD)
    1331             G2frame.Bind(wx.EVT_MENU, OnImportRigidBody, id=G2gd.wxID_RIGIDBODYIMPORT)
    1332             G2frame.Bind(wx.EVT_MENU, OnDefineTorsSeq, id=G2gd.wxID_RESIDUETORSSEQ) #enable only if residue RBs exist?
     1330            G2frame.Bind(wx.EVT_MENU, AddResidueRB, id=G2G.wxID_RIGIDBODYADD)
     1331            G2frame.Bind(wx.EVT_MENU, OnImportRigidBody, id=G2G.wxID_RIGIDBODYIMPORT)
     1332            G2frame.Bind(wx.EVT_MENU, OnDefineTorsSeq, id=G2G.wxID_RESIDUETORSSEQ) #enable only if residue RBs exist?
    13331333            G2frame.Page = [page,'rrb']
    13341334            UpdateResidueRB()
Note: See TracChangeset for help on using the changeset viewer.