Changeset 1588


Ignore:
Timestamp:
Nov 29, 2014 12:37:13 PM (7 years ago)
Author:
toby
Message:

fix error on save w/o Controls tree item

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r1576 r1588  
    981981        file = open(G2frame.GSASprojectfile,'wb')
    982982        print 'save to file: ',G2frame.GSASprojectfile
    983         # stick the file name into the tree
    984         Controls = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,G2frame.root, 'Controls'))
    985         Controls['LastSavedAs'] = G2frame.GSASprojectfile
     983        # stick the file name into the tree, if possible
     984        try:
     985            Controls = G2frame.PatternTree.GetItemPyData(
     986                G2gd.GetPatternTreeItemId(G2frame,G2frame.root, 'Controls'))
     987            Controls['LastSavedAs'] = os.path.abspath(G2frame.GSASprojectfile)
     988        except:
     989            pass
    986990        wx.BeginBusyCursor()
    987991        try:
Note: See TracChangeset for help on using the changeset viewer.