Changeset 453 for trunk/GSASII.py


Ignore:
Timestamp:
Jan 19, 2012 4:56:20 PM (11 years ago)
Author:
vondreele
Message:

refactor GSASIIgrid
new Hessian based least squares
new GSASIImath.py
work on focus issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r451 r453  
    246246        self.PatternTree.Bind(wx.EVT_TREE_DELETE_ITEM,
    247247            self.OnPatternTreeItemDelete, id=wxID_PATTERNTREE)
     248        self.PatternTree.Bind(wx.EVT_TREE_KEY_DOWN,
     249            self.OnPatternTreeKeyDown, id=wxID_PATTERNTREE)
    248250        self.root = self.PatternTree.AddRoot('Loaded Data: ')
    249251       
     
    259261        self.Bind(wx.EVT_CLOSE, self.ExitMain)
    260262        # various defaults
     263        self.oldFocus = None
    261264        self.GSASprojectfile = ''
    262265        self.dirname = ''
     
    333336    def OnPatternTreeItemActivated(self, event):
    334337        event.Skip()
     338       
     339    def OnPatternTreeKeyDown(self,event):
     340        key = event.GetKeyCode()
     341        item = self.PickId
     342        if key == wx.WXK_UP:
     343            self.oldFocus = self.mainPanel
     344            next = self.PatternTree.GetPrevSibling(item)
     345        elif key == wx.WXK_DOWN:
     346            self.oldFocus = self.mainPanel
     347            self.PatternTree.SelectItem(item)
    335348               
    336349    def OnPwdrRead(self, event):
Note: See TracChangeset for help on using the changeset viewer.