Changeset 1522 for trunk/GSASIIgrid.py


Ignore:
Timestamp:
Oct 7, 2014 10:35:40 AM (9 years ago)
Author:
toby
Message:

Put back logged objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r1520 r1522  
    212212        wx.TreeCtrl.Bind(self,eventtype,handler,*args,**kwargs)
    213213
    214 #    def GetItemPyData(self,*args,**kwargs):
    215 #        '''Override the standard method to wrap the contents
    216 #        so that the source can be tracked
    217 #        '''
    218 #        data = super(self.__class__,self).GetItemPyData(*args,**kwargs)
    219 #        textlist = self._getTreeItemsList(args[0])
    220 #        if type(data) is dict:
    221 #            return log.dictLogged(data,textlist)
    222 #        if type(data) is list:
    223 #            return log.listLogged(data,textlist)
    224 #        if type(data) is tuple: #N.B. tuples get converted to lists
    225 #            return log.listLogged(list(data),textlist)
    226 #        return data
     214    def GetItemPyData(self,*args,**kwargs):
     215        '''Override the standard method to wrap the contents
     216        so that the source can be tracked
     217        '''
     218        data = super(self.__class__,self).GetItemPyData(*args,**kwargs)
     219        textlist = self._getTreeItemsList(args[0])
     220        if type(data) is dict:
     221            return log.dictLogged(data,textlist)
     222        if type(data) is list:
     223            return log.listLogged(data,textlist)
     224        if type(data) is tuple: #N.B. tuples get converted to lists
     225            return log.listLogged(list(data),textlist)
     226        return data
    227227
    228228    def GetRelativeHistNum(self,histname):
Note: See TracChangeset for help on using the changeset viewer.