Changeset 2021


Ignore:
Timestamp:
Oct 20, 2015 10:17:12 PM (6 years ago)
Author:
toby
Message:

prevent reread of previously-read files by reading through all IMG tree items

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2019 r2021  
    30313031       
    30323032def GetPatternTreeDataNames(G2frame,dataTypes):
    3033     '''Needs a doc string
     3033    '''Finds all items in tree that match a 4 character prefix
     3034   
     3035    :param wx.Frame G2frame: Data tree frame object
     3036    :param list dataTypes: Contains one or more data tree item types to be matched
     3037      such as ['IMG '] or ['PWDR','HKLF']
     3038    :returns: a list of tree item names for the matching items 
    30343039    '''
    30353040    names = []
  • trunk/autoint.py

    r2020 r2021  
    7171        if self.params['Mode'] == 'file':
    7272            'get file info'
    73             #GSASIIpath.IPyBreak()
     73            GSASIIpath.IPyBreak()
    7474        else:
    7575            # load copy of Image Controls from current image and clean up
     
    207207        self.params['MaskFile'] = ''
    208208        self.params['IgnoreMask'] = True
    209         self.IntegratedList = []
    210209        fmtlist = G2IO.ExportPowderList(G2frame)
    211210        self.timer = wx.Timer()
     
    217216        self.params['filter'] = '*'+os.path.splitext(fileroot)[1]
    218217        os.chdir(self.imagedir)
     218        # get image names that have already been read
     219        self.IntegratedList = []
     220        for img in G2gd.GetPatternTreeDataNames(G2frame,['IMG ']):
     221            self.IntegratedList.append(G2frame.PatternTree.GetItemPyData(
     222                G2gd.GetPatternTreeItemId(G2frame,G2frame.root,img)
     223                )[1])
     224           
     225        GSASIIpath.IPyBreak()
    219226       
    220227        wx.Frame.__init__(self, G2frame)
Note: See TracChangeset for help on using the changeset viewer.