Ignore:
Timestamp:
Jan 31, 2020 4:07:00 AM (2 years ago)
Author:
vondreele
Message:

set default directories to G2frame.LastGPXdir or result from GetImportPath? or GetExportPath? in most FileDialogs?
It is never None; ultimate default is '.' with a printed message - shouldn't happen
Set self.LastGPXdir to location of gpx file anytime GSAS-II reads it to start that project.
It should never be None or '.'.
Remove RMCProfile patches - shouldn't be needed now.
Make sure RMCProfile data files are local to the gpx file - required for running RMCProfile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r4220 r4270  
    31623162def GetImportPath(G2frame):
    31633163    '''Determines the default location to use for importing files. Tries sequentially
    3164     G2frame.TutorialImportDir, config var Import_directory and G2frame.LastImportDir.
     3164    G2frame.TutorialImportDir, config var Import_directory, G2frame.LastImportDir
     3165    and G2frame.LastGPXdir
    31653166   
    3166     :returns: a string containing the path to be used when reading files or None
     3167    :returns: a string containing the path to be used when reading files or '.'
    31673168      if none of the above are specified.
    31683169    '''
     
    31853186        elif GSASIIpath.GetConfigValue('debug'):
    31863187            print('DBG_Warning: G2frame.LastImportDir not found = '+G2frame.LastImportDir)
    3187     return None
     3188    elif G2frame.LastGPXdir:
     3189        return G2frame.LastGPXdir
     3190    print('Import path not found - set to current directory')      #now shouldn't happen
     3191    return '.'
    31883192
    31893193def GetExportPath(G2frame):
     
    31983202    elif G2frame.LastGPXdir:
    31993203        return G2frame.LastGPXdir
    3200     else:
    3201         return '.'
     3204    print('Export path not found - set to current directory')      #now shouldn't happen
     3205    return '.'
     3206
    32023207
    32033208################################################################################
Note: See TracChangeset for help on using the changeset viewer.