Changeset 5109


Ignore:
Timestamp:
Dec 6, 2021 11:07:08 AM (10 months ago)
Author:
vondreele
Message:

fix problems of multiphase structure drawings & bad geometries seen when drawing tab is changed. Cell matrices now updated in beginning of Draw & Draw called twice in OnFocus?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r5106 r5109  
    98899889               
    98909890    def Draw(caller='',Fade=[],NPkey=False):
     9891        #reinitialize geometry stuff - needed after tab change
     9892        global cell, Vol, Amat, Bmat, A4mat, B4mat, BondRadii
     9893        cell = generalData['Cell'][1:7]
     9894        Vol = generalData['Cell'][7:8][0]
     9895        Amat,Bmat = G2lat.cell2AB(cell)         #Amat - crystal to cartesian, Bmat - inverse
     9896        Gmat,gmat = G2lat.cell2Gmat(cell)
     9897        A4mat = np.concatenate((np.concatenate((Amat,[[0],[0],[0]]),axis=1),[[0,0,0,1],]),axis=0)
     9898        B4mat = np.concatenate((np.concatenate((Bmat,[[0],[0],[0]]),axis=1),[[0,0,0,1],]),axis=0)
    98919899        vdWRadii = generalData['vdWRadii']
    98929900        BondRadii = generalData['BondRadii']
     
    1022110229       
    1022210230    def OnFocus(event):
    10223         Draw('focus')
    10224        
    10225     # PlotStructure starts here
     10231        Draw('focus')           
     10232        Draw('focus')     #to get correct drawing after tab change       
     10233       
     10234    #### PlotStructure starts here
    1022610235    global mcsaXYZ,mcsaTypes,mcsaBonds,txID,contourSet,Zslice
    1022710236    global cell, Vol, Amat, Bmat, A4mat, B4mat, BondRadii
Note: See TracChangeset for help on using the changeset viewer.