Changeset 3436


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

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

Location:
trunk
Files:
2 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():
  • trunk/fsource/SConstruct

    r3203 r3436  
    9595FORTflags = ""
    9696LDFLAGS = ''
     97tmpdir = None
    9798#==========================================================================================
    9899# configure platform dependent options here:
     
    115116    print ("Sorry, parameters for platform "+sys.platform+" are not yet defined")
    116117    sys.exit()
     118if ARGUMENTS.get('TMP'):
     119   tmpdir = ARGUMENTS.get('TMP')
    117120if FCompiler == 'gfortran':
    118121    if ARGUMENTS.get('LIBGCC', '').upper().startswith('T'):
     
    185188LDFLAGS='string'   -- string of options to be used for f2py during link step
    186189
     190TMP=<path> --- where <path> is something like /tmp sets builds to be performed
     191   in that directory.
     192
    187193Note that at present, this has been tested with 32-bit python on windows and
    188 Mac & 64 bit on linux. Python 3.x is not supported in GSAS-II yet.
     194Mac & 64 bit on linux. 32-bit builds with anaconda/gfortran in 32-bit Python
     195is not working, at least not when installed in 64-bits Linux/Windows.
    189196
    190197examples:
     
    255262            F2PYflags = '--compiler=mingw32 --fcompiler=gfortran --f77flags="-fno-range-check -m64"'
    256263    elif sys.platform == "win32":
    257         #if FORTflags == "": FORTflags = ' -w -O2 -m32'
     264        # the next line may need to be removed. When compiling with a 32-bit machine?
     265        #if FORTflags == "": FORTflags = ' -w -O2 -m32'
    258266        if F2PYflags == "":
    259267            F2PYflags = '--compiler=mingw32 --fcompiler=gfortran --f77flags="-fno-range-check"'
     
    271279        print ('Error: specify a F2PYflags value')
    272280        sys.exit()
     281if tmpdir:
     282    F2PYflags += " --build-dir " + tmpdir
    273283#==========================================================================================
    274284# Setup build Environment
Note: See TracChangeset for help on using the changeset viewer.