Changeset 1780 for trunk/GSASII.py


Ignore:
Timestamp:
Apr 7, 2015 5:14:33 PM (7 years ago)
Author:
vondreele
Message:

force collapse of all children when main tree item is collapsed
begin texture fitting from seq. refinements
fix bugs in plotting if all SH coeff = 0
set background on Fcsq when delt = 3sig & 10 sig

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r1779 r1780  
    21992199       
    22002200    def OnPatternTreeItemCollapsed(self, event):
    2201         'Called when a tree item is collapsed'
    2202         event.Skip()
     2201        'Called when a tree item is collapsed - all children will be collapsed'
     2202        self.PatternTree.CollapseAllChildren(event.GetItem())
    22032203
    22042204    def OnPatternTreeItemExpanded(self, event):
     
    22482248    def OnPatternTreeKeyDown(self,event):
    22492249        'Allows stepping through the tree with the up/down arrow keys'
     2250        keyevt = event.GetKeyEvent()
    22502251        key = event.GetKeyCode()
    2251         item = self.PickId
     2252        item = self.PatternTree.GetSelection()
    22522253        if type(item) is int: return # is this the toplevel in tree?
     2254        name = self.PatternTree.GetItemText(item)
     2255        parent = self.PatternTree.GetItemParent(item)
    22532256        if key == wx.WXK_UP:
    22542257            self.oldFocus = wx.Window.FindFocus()
     2258#            if keyevt.GetModifiers() == wx.MOD_SHIFT:
     2259#                if type(parent) is int: return # is this the toplevel in tree?
     2260#                prev = self.PatternTree.GetPrevSibling(parent)
     2261#                self.PatternTree.Expand(prev)
     2262#                id = G2gd.GetPatternTreeItemId(self,prev,name)
     2263#                G2gd.MovePatternTreeToGrid(self,id)
     2264#            else:   
    22552265            self.PatternTree.GetPrevSibling(item)
    22562266        elif key == wx.WXK_DOWN:
    2257             self.oldFocus = wx.Window.FindFocus()
     2267#            if keyevt.GetModifiers() == wx.MOD_SHIFT:
     2268#                if type(parent) is int: return # is this the toplevel in tree?
     2269#                next = self.PatternTree.GetNextSibling(parent)
     2270#                self.PatternTree.Expand(next)
     2271#                id = G2gd.GetPatternTreeItemId(self,next,name)
     2272#                G2gd.MovePatternTreeToGrid(self,id)
     2273#            else:   
    22582274            self.PatternTree.GetNextSibling(item)
    22592275               
     
    35203536            wx.Yield()
    35213537        oldId =  self.PatternTree.GetSelection()        #retain current selection
    3522         oldName = self.PatternTree.GetItemText(oldId)
    3523         parentId = self.PatternTree.GetItemParent(oldId)
    35243538        parentName = ''
    3525         if parentId:
    3526             parentName = self.PatternTree.GetItemText(parentId)     #find the current data tree name
     3539        if type(oldId) is int:  #nothing had been selected!
     3540            oldName = self.PatternTree.GetItemText(oldId)
     3541            parentId = self.PatternTree.GetItemParent(oldId)
     3542            if parentId:
     3543                parentName = self.PatternTree.GetItemText(parentId)     #find the current data tree name
    35273544        dlg2 = wx.MessageDialog(self,'Load new result?','Refinement results, Rw =%.3f'%(Rw),wx.OK|wx.CANCEL)
    35283545        try:
Note: See TracChangeset for help on using the changeset viewer.