Changeset 3065


Ignore:
Timestamp:
Sep 11, 2017 3:58:13 PM (4 years ago)
Author:
toby
Message:

fix error introduced by variable sorting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIconstrGUI.py

    r3061 r3065  
    392392                l2 = max(l2,len(i2))
    393393            fmt = "{:"+str(l1)+"s} {:"+str(l2)+"s} {:s}"
    394             atchoice = G2obj.SortVariables([fmt.format(*i1) for i1 in choices])
     394            atchoices = [fmt.format(*i1) for i1 in choices] # reformat list as str with columns
    395395            dlg = G2G.G2MultiChoiceDialog(
    396396                G2frame,legend,
    397                 'Constrain '+str(FrstVarb)+' with...',atchoice,
     397                'Constrain '+str(FrstVarb)+' with...',atchoices,
    398398                toggle=False,size=(625,400),monoFont=True)
    399399            dlg.CenterOnParent()
     
    709709        '''
    710710        #varListlbl = ["("+i+") "+G2obj.fmtVarDescr(i) for i in varList]
     711        if constType == 'equivalence':
     712            omitVars = G2mv.GetDependentVars()
     713        else:
     714            omitVars = []
     715        varList = G2obj.SortVariables([i for i in varList if i not in omitVars])
    711716        l2 = l1 = 1
    712717        for i in varList:
     
    715720            l2 = max(l2,len(loc))
    716721        fmt = "{:"+str(l1)+"s} {:"+str(l2)+"s} {:s}"
    717         if constType == 'equivalence':
    718             omitVars = G2mv.GetDependentVars()
    719         else:
    720             omitVars = []
    721         varList = G2obj.SortVariables([i for i in varList if i not in omitVars])
    722722        varListlbl = [fmt.format(i,*G2obj.VarDescr(i)) for i in varList]
    723723        dlg = G2G.G2SingleChoiceDialog(G2frame,'Select 1st variable:',
Note: See TracChangeset for help on using the changeset viewer.