Changeset 2498 for trunk


Ignore:
Timestamp:
Oct 20, 2016 10:03:57 AM (9 years ago)
Author:
toby
Message:

set Refine flag after linking hist & phase in import

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/GSASII.py

    r2491 r2498  
    765765                    raise Exception('Unexpected histogram '+str(histoName))
    766766        wx.EndBusyCursor()
     767        self.EnableRefineCommand()
    767768        return # success
    768769       
     
    952953                            ref[3] = 0
    953954        wx.EndBusyCursor()
    954        
     955        self.EnableRefineCommand()       
    955956        return # success
    956957
     
    14441445                    self.ErrorDialog('Read Error',
    14451446                                     'Error opening/reading file '+str(instfile))
     1447    def EnableRefineCommand(self):
     1448        haveData = False
     1449        # check for phases connected to histograms
     1450        sub = G2gd.GetPatternTreeItemId(self,self.root,'Phases')
     1451        if not sub: return
     1452        item, cookie = self.PatternTree.GetFirstChild(sub)
     1453        while item: # loop over phases
     1454            data = self.PatternTree.GetItemPyData(item)
     1455            item, cookie = self.PatternTree.GetNextChild(sub, cookie)
     1456            UseList = data['Histograms']
     1457            if UseList: haveData = True
     1458        if haveData:
     1459            self.dataFrame.DataMenu.Enable(G2gd.wxID_DATADELETE,True)
     1460            for item in self.Refine: item.Enable(True)
     1461        else:
     1462            self.dataFrame.DataMenu.Enable(G2gd.wxID_DATADELETE,False)
     1463            for item in self.Refine: item.Enable(False)
     1464
    14461465       
    14471466    def OnImportPowder(self,event):
     
    16371656                    G2gd.GetPatternTreeItemId(self,Id,'Reflection Lists'))
    16381657                refList[generalData['Name']] = []
     1658        self.EnableRefineCommand()
    16391659        return # success
    16401660
     
    18021822                G2gd.GetPatternTreeItemId(self,Id,'Reflection Lists'))
    18031823            refList[generalData['Name']] = []
     1824        self.EnableRefineCommand()
    18041825        return # success
    18051826       
  • TabularUnified trunk/GSASIIctrls.py

    r2431 r2498  
    40214021            if os.path.exists(os.path.join(self.tutorialPath,i[0],i[1]))]
    40224022        if not indices:
    4023             G2MessageBox(self,'There are no downloaded tutorials','None downloaded')
     4023            G2MessageBox(self,
     4024                         'There are no downloaded tutorials in '+self.tutorialPath,
     4025                         'None downloaded')
    40244026            return
    40254027        choices = [tutorialCatalog[i][2] for i in indices]
Note: See TracChangeset for help on using the changeset viewer.