Changeset 1960 for trunk/GSASIIIO.py


Ignore:
Timestamp:
Aug 25, 2015 12:53:42 PM (6 years ago)
Author:
toby
Message:

add current version number to Controls dict on save; display on read

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r1949 r1960  
    976976               str(G2frame.GSASprojectfile))
    977977        return
     978    LastSavedUsing = None
    978979    file = open(G2frame.GSASprojectfile,'rb')
    979980    print 'load from file: ',G2frame.GSASprojectfile
     
    9991000                G2frame.PatternTree.SetItemPyData(Id,datum[1])
    10001001            else:
    1001                 G2frame.PatternTree.SetItemPyData(Id,datum[1])
     1002                G2frame.PatternTree.SetItemPyData(Id,datum[1])             
     1003                if datum[0] == 'Controls' and 'LastSavedUsing' in datum[1]:
     1004                    LastSavedUsing = datum[1]['LastSavedUsing']
    10021005            for datus in data[1:]:
    10031006                sub = G2frame.PatternTree.AppendItem(Id,datus[0])
     
    10171020                    G2frame.imageDefault = Data               
    10181021        file.close()
    1019         print('project load successful')
     1022        if LastSavedUsing:
     1023            print('GPX load successful. Last saved with GSAS-II version '+LastSavedUsing)
     1024        else:
     1025            print('project load successful')
    10201026        G2frame.NewPlot = True
    10211027    except:
     
    10381044                G2gd.GetPatternTreeItemId(G2frame,G2frame.root, 'Controls'))
    10391045            Controls['LastSavedAs'] = os.path.abspath(G2frame.GSASprojectfile)
     1046            Controls['LastSavedUsing'] = str(GSASIIpath.GetVersionNumber())
    10401047        except:
    10411048            pass
Note: See TracChangeset for help on using the changeset viewer.