Changeset 3939


Ignore:
Timestamp:
Apr 30, 2019 8:21:22 AM (2 years ago)
Author:
vondreele
Message:

check if old GSASII.bat file in registry exists; if not change registry to new one
fix crash on opening plot window after refinement

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r3928 r3939  
    26682668    if data is None:
    26692669        data = G2frame.GPXtree.GetItemPyData(G2frame.PatternId)
    2670     if plottype not in ['SASD','REFD'] and 'PWDR' in G2frame.GPXtree.GetItemText(G2frame.PickId):
     2670    if G2frame.PickId and plottype not in ['SASD','REFD'] and 'PWDR' in G2frame.GPXtree.GetItemText(G2frame.PickId):
    26712671        publish = PublishPlot
    26722672    else:
  • trunk/makeBat.py

    r3936 r3939  
    9191        oldgpx = winreg.OpenKey(winreg.HKEY_CURRENT_USER,r'Software\CLASSES\GSAS-II.project')
    9292        oldopen = winreg.OpenKey(oldgpx,r'shell\open\command')
     93        oldBat = winreg.QueryValue(oldopen,None).split()[0]
     94        os.stat(oldBat)     #check if it is still around
    9395    except FileNotFoundError:
    94         new = True
     96        if oldBat:
     97            print('old '+oldBat+ 'not found; registry entry will be made for new one')
     98        else:
     99            new = True
    95100    if not new:
    96101        try:
    97             oldBat = winreg.QueryValue(oldopen,None).split()[0]
    98102            if oldBat != G2bat:
    99103                dlg = wx.MessageDialog(None,'gpx files already assigned in registry to: \n'+oldBat+'\n Replace with: '+G2bat+'?','GSAS-II gpx in use',
Note: See TracChangeset for help on using the changeset viewer.