Changeset 1005 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jul 22, 2013 1:00:52 PM (10 years ago)
Author:
vondreele
Message:

removed try/except for set focus items
fixed 'N' & 'P' key behavior for structure plots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1004 r1005  
    10261026            cb.SetValue(' key press')
    10271027            wx.CallAfter(OnPlotKeyPress,event)
    1028         try:
    1029             Page.canvas.SetFocus() # redirect the Focus from the button back to the plot
    1030         except:
    1031             pass
    1032 
     1028        Page.canvas.SetFocus() # redirect the Focus from the button back to the plot
    10331029                       
    10341030    def OnMotion(event):
     
    21482144            if event.key in 'l':
    21492145                wx.CallAfter(OnImPlotKeyPress,event)
    2150         try:
    2151             Page.canvas.SetFocus() # redirect the Focus from the button back to the plot
    2152         except:
    2153             pass
     2146        Page.canvas.SetFocus() # redirect the Focus from the button back to the plot
    21542147                       
    21552148    def OnImPick(event):
     
    27502743            cb.SetValue(' save as/key:')
    27512744            wx.CallAfter(OnKey,event)
    2752         try:
    2753             Page.canvas.SetFocus() # redirect the Focus from the button back to the plot
    2754         except:
    2755             pass
     2745        Page.canvas.SetFocus() # redirect the Focus from the button back to the plot
    27562746
    27572747    def OnKey(event):           #on key UP!!
     
    27822772        elif key in ['N']:
    27832773            drawAtoms = drawingData['Atoms']
     2774            if not len(drawAtoms):      #no atoms
     2775                return
    27842776            pI = drawingData['viewPoint'][1]
     2777            if not len(pI):
     2778                pI = [0,0]
    27852779            if indx:
    27862780                pI[0] = indx[pI[1]]
     
    28002794        elif key in ['P']:
    28012795            drawAtoms = drawingData['Atoms']
     2796            if not len(drawAtoms):      #no atoms
     2797                return
    28022798            pI = drawingData['viewPoint'][1]
     2799            if not len(pI):
     2800                pI = [0,0]
    28032801            if indx:
    28042802                pI[0] = indx[pI[1]]
Note: See TracChangeset for help on using the changeset viewer.