Changeset 2298 for trunk/GSASIIgrid.py


Ignore:
Timestamp:
May 27, 2016 2:48:22 PM (6 years ago)
Author:
vondreele
Message:

Add stubs for BondDialog? & AngleDialog? for adding these to Seq results table
Add menu items for above
fix a bug in showing seq results
revert the occurrence counter for image integrations
capture bad pids in OnPageChanged?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2272 r2298  
    136136[ wxID_RENAMESEQSEL,wxID_SAVESEQSEL,wxID_SAVESEQSELCSV,wxID_SAVESEQCSV,wxID_PLOTSEQSEL,
    137137  wxID_ORGSEQSEL,wxADDSEQVAR,wxDELSEQVAR,wxEDITSEQVAR,wxCOPYPARFIT,wxID_AVESEQSEL,
    138   wxADDPARFIT,wxDELPARFIT,wxEDITPARFIT,wxDOPARFIT,
    139 ] = [wx.NewId() for item in range(15)]
     138  wxADDPARFIT,wxDELPARFIT,wxEDITPARFIT,wxDOPARFIT,wxADDSEQDIST,wxADDSEQANGLE
     139] = [wx.NewId() for item in range(17)]
    140140
    141141[ wxID_MODELCOPY,wxID_MODELFIT,wxID_MODELADD,wxID_ELEMENTADD,wxID_ELEMENTDELETE,
     
    14641464            help='Add a new pseudo-variable')
    14651465        self.SequentialPvars.Append(
     1466            id=wxADDSEQDIST, kind=wx.ITEM_NORMAL,text='Add dist',
     1467            help='Add a new bond distance pseudo-variable')
     1468        self.SequentialPvars.Append(
     1469            id=wxADDSEQANGLE, kind=wx.ITEM_NORMAL,text='Add angle',
     1470            help='Add a new bond angle pseudo-variable')
     1471        self.SequentialPvars.Append(
    14661472            id=wxDELSEQVAR, kind=wx.ITEM_NORMAL,text='Delete',
    14671473            help='Delete an existing pseudo-variable')
     
    27532759            Controls['SeqPseudoVars'][calcobj.eObj.expression] = obj
    27542760            UpdateSeqResults(G2frame,data,G2frame.dataDisplay.GetSize()) # redisplay variables
    2755 
     2761           
     2762    def AddNewDistPseudoVar(event):
     2763        print 'Add bond distance pseudo-variable here - TBD'
     2764#        dlg = G2exG.BondDialog(
     2765#            G2frame.dataDisplay,PSvarDict,
     2766#            header='Select a Bond here',
     2767#            VarLabel = "New Bond",
     2768#            fit=False)
     2769#        obj = dlg.Show(True)
     2770#        dlg.Destroy()
     2771#        if obj:
     2772#            calcobj = G2obj.ExpressionCalcObj(obj)
     2773#            Controls['SeqPseudoVars'][calcobj.eObj.expression] = obj
     2774#            UpdateSeqResults(G2frame,data,G2frame.dataDisplay.GetSize()) # redisplay variables
     2775
     2776    def AddNewAnglePseudoVar(event):
     2777        print 'Add bond angle pseudo-variable here - TBD'
     2778#        dlg = G2exG.AngleDialog(
     2779#            G2frame.dataDisplay,PSvarDict,
     2780#            header='Enter an Angle here',
     2781#            VarLabel = "New Angle",
     2782#            fit=False)
     2783#        obj = dlg.Show(True)
     2784#        dlg.Destroy()
     2785#        if obj:
     2786#            calcobj = G2obj.ExpressionCalcObj(obj)
     2787#            Controls['SeqPseudoVars'][calcobj.eObj.expression] = obj
     2788#            UpdateSeqResults(G2frame,data,G2frame.dataDisplay.GetSize()) # redisplay variables
    27562789    def UpdateParmDict(parmDict):
    27572790        '''generate the atom positions and the direct & reciprocal cell values,
     
    31813214    G2frame.dataFrame.Bind(wx.EVT_MENU, OnReOrgSelSeq, id=wxID_ORGSEQSEL)
    31823215    G2frame.dataFrame.Bind(wx.EVT_MENU, AddNewPseudoVar, id=wxADDSEQVAR)
     3216    G2frame.dataFrame.Bind(wx.EVT_MENU, AddNewDistPseudoVar, id=wxADDSEQDIST)
     3217    G2frame.dataFrame.Bind(wx.EVT_MENU, AddNewAnglePseudoVar, id=wxADDSEQANGLE)
    31833218    G2frame.dataFrame.Bind(wx.EVT_MENU, DelPseudoVar, id=wxDELSEQVAR)
    31843219    G2frame.dataFrame.Bind(wx.EVT_MENU, EditPseudoVar, id=wxEDITSEQVAR)
     
    33823417    # Make dict needed for creating & editing pseudovars (PSvarDict).
    33833418    name = histNames[0]
    3384     parmDict = data[name].get('parmDict')
     3419    parmDict = data[name].get('parmDict',{})
    33853420    PSvarDict = parmDict.copy()
    33863421    PSvarDict.update(sampleParms)
Note: See TracChangeset for help on using the changeset viewer.