Changeset 1183 for trunk/GSASIIgrid.py


Ignore:
Timestamp:
Jan 5, 2014 9:22:22 AM (8 years ago)
Author:
toby
Message:

fixup number formatting; update produced doc files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r1177 r1183  
    177177     
    178178    :param list [nDig,nPlc]: number of digits & places after decimal to use
    179       for display of float (default=[10,2])
     179      for display of float. Alternately, None can be specified which causes
     180      numbers to be displayed with approximately 5 significant figures
     181      (Default=None).
    180182
    181183    :param bool notBlank: if True (default) blank values are invalid
     
    226228
    227229    '''
    228     def __init__(self,parent,loc,key,nDig=[10,2],notBlank=True,min=None,max=None,
     230    def __init__(self,parent,loc,key,nDig=None,notBlank=True,min=None,max=None,
    229231                 OKcontrol=None,OnLeave=None,typeHint=None,
    230232                 CIFinput=False, **kw):
     
    318320                else:
    319321                    self.invalid = True
    320             wx.TextCtrl.SetValue(self,str(G2py3.FormatValue(val,self.nDig)))
     322            if self.nDig:
     323                wx.TextCtrl.SetValue(self,str(G2py3.FormatValue(val,self.nDig)))
     324            else:
     325                wx.TextCtrl.SetValue(self,str(G2py3.FormatSigFigs(val)))
    321326        else:
    322327            wx.TextCtrl.SetValue(self,str(val))
     
    15981603            if isinstance(parmDict[name],basestring): continue
    15991604            try:
    1600                 value = G2py3.FormatValue(parmDict[name])
     1605                value = G2py3.FormatSigFigs(parmDict[name])
    16011606            except TypeError:
    16021607                value = str(parmDict[name])+' -?' # unexpected
Note: See TracChangeset for help on using the changeset viewer.