Ignore:
Timestamp:
Feb 10, 2018 12:25:09 PM (4 years ago)
Author:
toby
Message:

revise plot update code; add plotting docs & cleanup; always use last phase tab

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r3250 r3270  
    221221            return wx.TreeCtrl.SetItemPyData(self,id,data)
    222222
    223     def onSelectionChanged(self,event):
    224         '''Log each press on a tree item here.
    225         '''
    226         if not self.G2frame.treePanel:
    227             return
    228         if self.SelectionChanged:
    229             textlist = self._getTreeItemsList(event.GetItem())
    230             if log.LogInfo['Logging'] and event.GetItem() != self.root:
    231                 textlist[0] = self.GetRelativeHistNum(textlist[0])
    232                 if textlist[0] == "Phases" and len(textlist) > 1:
    233                     textlist[1] = self.GetRelativePhaseNum(textlist[1])
    234                 log.MakeTreeLog(textlist)
    235             if textlist == self.textlist:
    236                 return      #same as last time - don't get it again
    237             self.textlist = textlist
    238             self.SelectionChanged(event)
    239 
    240     def Bind(self,eventtype,handler,*args,**kwargs):
    241         '''Override the Bind() function so that page change events can be trapped
    242         '''
    243         if eventtype == wx.EVT_TREE_SEL_CHANGED:
    244             self.SelectionChanged = handler
    245             wx.TreeCtrl.Bind(self,eventtype,self.onSelectionChanged)
    246             return
    247         wx.TreeCtrl.Bind(self,eventtype,handler,*args,**kwargs)
     223    # def onSelectionChanged(self,event):
     224    #     '''Log each press on a tree item here.
     225    #     '''
     226    #     if not self.G2frame.treePanel:
     227    #         return
     228    #     if self.SelectionChanged:
     229    #         textlist = self._getTreeItemsList(event.GetItem())
     230    #         if log.LogInfo['Logging'] and event.GetItem() != self.root:
     231    #             textlist[0] = self.GetRelativeHistNum(textlist[0])
     232    #             if textlist[0] == "Phases" and len(textlist) > 1:
     233    #                 textlist[1] = self.GetRelativePhaseNum(textlist[1])
     234    #             log.MakeTreeLog(textlist)
     235    #         if textlist == self.textlist:
     236    #             return      #same as last time - don't get it again
     237    #         self.textlist = textlist
     238    #         self.SelectionChanged(event)
     239
     240    # def Bind(self,eventtype,handler,*args,**kwargs):
     241    #     '''Override the Bind() function so that page change events can be trapped
     242    #     '''
     243    #     if eventtype == wx.EVT_TREE_SEL_CHANGED:
     244    #         self.SelectionChanged = handler
     245    #         wx.TreeCtrl.Bind(self,eventtype,self.onSelectionChanged)
     246    #         return
     247    #     wx.TreeCtrl.Bind(self,eventtype,handler,*args,**kwargs)
    248248
    249249    # commented out, disables Logging
Note: See TracChangeset for help on using the changeset viewer.