Changeset 2316 for trunk/GSASIIgrid.py


Ignore:
Timestamp:
Jun 12, 2016 8:22:48 PM (7 years ago)
Author:
toby
Message:

prototype distance calc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2314 r2316  
    14651465            help='Add a new pseudo-variable')
    14661466        self.SequentialPvars.Append(
    1467             id=wxADDSEQDIST, kind=wx.ITEM_NORMAL,text='Add dist',
     1467            id=wxADDSEQDIST, kind=wx.ITEM_NORMAL,text='Calc Distance',
    14681468            help='Add a new bond distance pseudo-variable')
    14691469        self.SequentialPvars.Append(
    1470             id=wxADDSEQANGLE, kind=wx.ITEM_NORMAL,text='Add angle',
     1470            id=wxADDSEQANGLE, kind=wx.ITEM_NORMAL,text='Calc Angle',
    14711471            help='Add a new bond angle pseudo-variable')
    14721472        self.SequentialPvars.Append(
     
    27722772            VarLabel = "New Bond")
    27732773        if dlg.ShowModal() == wx.ID_OK:
    2774             obj = dlg.GetSelection()
     2774            #obj = dlg.GetSelection()
     2775            # create an expression object
     2776            obj = G2obj.ExpressionObj()
     2777            obj.expression = 'Dist(1,2)'
     2778            obj.distance_stuff = np.array([[0,1,1,-1]])
     2779            obj.distance_atoms = [1,2]
    27752780        else:
    27762781            dlg.Destroy()
     
    27782783        dlg.Destroy()
    27792784        if obj:
    2780             calcobj = G2obj.ExpressionCalcObj(obj)
    2781             Controls['SeqPseudoVars'][calcobj.eObj.expression] = obj
     2785            Controls['SeqPseudoVars'][obj.expression] = obj
    27822786            UpdateSeqResults(G2frame,data,G2frame.dataDisplay.GetSize()) # redisplay variables
    27832787
Note: See TracChangeset for help on using the changeset viewer.