Ignore:
Timestamp:
Mar 3, 2021 6:17:59 PM (9 months ago)
Author:
vondreele
Message:

comment out MakeDrawAtom? in G2constrGUI & make the call to G2mth.MakeDrawAtom? which does same thing
move MakeDrawAtom? & DrawAtomsReplaeyID from G2phsGUI to G2mth & fix all references to them in G2phsGUI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIconstrGUI.py

    r4823 r4838  
    260260            self.onChange()
    261261
    262 def MakeDrawAtom(data,atom):
    263     'Convert atom to format needed to draw it'
    264     generalData = data['General']
    265     deftype = G2obj.validateAtomDrawType(
    266         GSASIIpath.GetConfigValue('DrawAtoms_default'),generalData)
    267     if generalData['Type'] in ['nuclear','faulted',]:
    268         atomInfo = [atom[:2]+atom[3:6]+['1']+[deftype]+
    269                     ['']+[[255,255,255]]+atom[9:]+[[],[]]][0]
    270     ct,cs = [1,8]         #type & color
    271     atNum = generalData['AtomTypes'].index(atom[ct])
    272     atomInfo[cs] = list(generalData['Color'][atNum])
    273     return atomInfo
     262# def MakeDrawAtom(data,atom):
     263#     'Convert atom to format needed to draw it'
     264#     generalData = data['General']
     265#     deftype = G2obj.validateAtomDrawType(
     266#         GSASIIpath.GetConfigValue('DrawAtoms_default'),generalData)
     267#     if generalData['Type'] in ['nuclear','faulted',]:
     268#         atomInfo = [atom[:2]+atom[3:6]+['1']+[deftype]+
     269#                     ['']+[[255,255,255]]+atom[9:]+[[],[]]][0]
     270#     ct,cs = [1,8]         #type & color
     271#     atNum = generalData['AtomTypes'].index(atom[ct])
     272#     atomInfo[cs] = list(generalData['Color'][atNum])
     273#     return atomInfo
    274274
    275275class ConstraintDialog(wx.Dialog):
     
    20612061            atmData['Drawing']['Atoms'] = []
    20622062            for atom in atmData['Atoms']:
    2063                 atmData['Drawing']['Atoms'].append(MakeDrawAtom(atmData,atom))
     2063                atmData['Drawing']['Atoms'].append(G2mth.MakeDrawAtom(atmData,atom))
    20642064
    20652065        def onCancel(event,page=0):
Note: See TracChangeset for help on using the changeset viewer.