Changeset 4817


Ignore:
Timestamp:
Feb 14, 2021 11:16:10 AM (8 months ago)
Author:
vondreele
Message:

fix a contour level bug - crash when there isn't any

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r4812 r4817  
    82088208        rho = G2mth.getRho([Cx,Cy,Cz],mapData)
    82098209        if contours:
    8210             contlevels = contourSet.get_array()
    8211             contstr = str(contlevels).strip('[]')
    8212             G2frame.G2plotNB.status.SetStatusText('Cursor position: %.4f, %.4f, %.4f; density: %.4f, contours at: %s'%(Cx,Cy,Cz,rho,contstr),1)
     8210            try:
     8211                contlevels = contourSet.get_array()
     8212                contstr = str(contlevels).strip('[]')
     8213                G2frame.G2plotNB.status.SetStatusText('Cursor position: %.4f, %.4f, %.4f; density: %.4f, contours at: %s'%(Cx,Cy,Cz,rho,contstr),1)
     8214            except AttributeError:
     8215                G2frame.G2plotNB.status.SetStatusText('Cursor position: %.4f, %.4f, %.4f; density: %.4f'%(Cx,Cy,Cz,rho),1)
    82138216        else:
    82148217            G2frame.G2plotNB.status.SetStatusText('Cursor position: %.4f, %.4f, %.4f; density: %.4f'%(Cx,Cy,Cz,rho),1)
Note: See TracChangeset for help on using the changeset viewer.