Ignore:
Timestamp:
Jun 17, 2018 12:42:56 AM (5 years ago)
Author:
toby
Message:

fix phase fraction with no included phases; repaint after; put TMP dir option into scons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIddataGUI.py

    r3296 r3436  
    126126        if 'PWDR' in G2frame.hist and generalData['Type'] != 'magnetic':
    127127            wtSum = G2pwd.PhaseWtSum(G2frame,G2frame.hist)
    128             weightFr = UseList[G2frame.hist]['Scale'][0]*generalData['Mass']/wtSum
    129             scaleSizer.Add(wx.StaticText(DData,label=' Wt. fraction: %.3f'%(weightFr)),0,WACV)
     128            if wtSum:
     129                weightFr = UseList[G2frame.hist]['Scale'][0]*generalData['Mass']/wtSum
     130                scaleSizer.Add(wx.StaticText(DData,label=' Wt. fraction: %.3f'%(weightFr)),0,WACV)
    130131        return scaleSizer
    131132       
     
    795796    def RepaintHistogramInfo(Scroll=0):
    796797        if 'phoenix' in wx.version():
     798#            if DData.__class__ is  not wx._core.ScrolledWindow:
     799#                # How to determine window is closed in Phoenix?
     800#                return
    797801            G2frame.bottomSizer.Clear(True)
    798802        else:
     803            if DData.__class__ is  not wx._windows.ScrolledWindow:
     804                # fix bug where this is called after the Window is deleted
     805                return
    799806            G2frame.bottomSizer.DeleteWindows()
    800             Indx.clear()
    801             G2frame.bottomSizer = ShowHistogramInfo()
    802             mainSizer.Add(G2frame.bottomSizer)
    803             mainSizer.Layout()
    804             G2frame.dataWindow.Refresh()
    805             DData.SetVirtualSize(mainSizer.GetMinSize())
    806             DData.Scroll(0,Scroll)
    807             G2frame.dataWindow.SendSizeEvent()
     807        Indx.clear()
     808        G2frame.bottomSizer = ShowHistogramInfo()
     809        mainSizer.Add(G2frame.bottomSizer)
     810        mainSizer.Layout()
     811        G2frame.dataWindow.Refresh()
     812        DData.SetVirtualSize(mainSizer.GetMinSize())
     813        DData.Scroll(0,Scroll)
     814        G2frame.dataWindow.SendSizeEvent()
    808815       
    809816    def ShowHistogramInfo():
Note: See TracChangeset for help on using the changeset viewer.