Changeset 4465 for trunk/GSASIIplot.py
 Timestamp:
 Jun 5, 2020 10:26:26 AM (17 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIplot.py
r4463 r4465 8191 8191 Indx = GetSelectedAtoms() 8192 8192 if G2frame.phaseDisplay.GetPageText(getSelection()) == 'Map peaks': 8193 for i,peak in enumerate( mapPeaks):8193 for i,peak in enumerate(atomList): 8194 8194 x,y,z = peak[1:4] 8195 8195 X,Y,Z = GLU.gluProject(x,y,z,Model,Proj,View) … … 8204 8204 except: 8205 8205 SetSelectedAtoms(i,Add) 8206 return 8207 elif G2frame.phaseDisplay.GetPageText(getSelection()) == 'Draw Atoms': 8208 atomList = drawAtoms 8209 cx = G2phG.getAtomPtrs(data,True)[0] 8206 8210 else: 8207 cx = drawingData['atomPtrs'][0] 8208 for i,atom in enumerate(drawAtoms): 8209 x,y,z = atom[cx:cx+3] 8210 X,Y,Z = GLU.gluProject(x,y,z,Model,Proj,View) 8211 XY = [int(X),int(View[3]Y)] 8212 if np.allclose(xy,XY,atol=10) and Z < Zmax: 8213 Zmax = Z 8214 try: 8215 Indx.remove(i) 8216 ClearSelectedAtoms() 8217 for Id in Indx: 8218 SetSelectedAtoms(Id,Add) 8219 except: 8220 SetSelectedAtoms(i,Add) 8211 atomList = data['Atoms'] 8212 cx = G2phG.getAtomPtrs(data)[0] 8213 for i,atom in enumerate(atomList): 8214 x,y,z = atom[cx:cx+3] 8215 X,Y,Z = GLU.gluProject(x,y,z,Model,Proj,View) 8216 XY = [int(X),int(View[3]Y)] 8217 if np.allclose(xy,XY,atol=10) and Z < Zmax: 8218 Zmax = Z 8219 try: 8220 Indx.remove(i) 8221 ClearSelectedAtoms() 8222 for Id in Indx: 8223 SetSelectedAtoms(Id,Add) 8224 except: 8225 SetSelectedAtoms(i,Add) 8221 8226 8222 8227 def OnMouseDown(event): … … 8391 8396 for i,atom in enumerate(atomData): 8392 8397 if atom[1] == Id: 8393 G2frame.phaseDisplay.GetPage(page).SelectRow(i ) #this is the Atoms grid in Atoms8398 G2frame.phaseDisplay.GetPage(page).SelectRow(i,Add) #this is the Atoms grid in Atoms 8394 8399 8395 8400 def GetSelectedAtoms():
Note: See TracChangeset
for help on using the changeset viewer.