Changeset 1401


Ignore:
Timestamp:
Jun 30, 2014 12:29:01 PM (7 years ago)
Author:
vondreele
Message:

trap keystrokes for powder plots when data window not on powder info.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1399 r1401  
    452452   
    453453    def OnPlotKeyPress(event):
     454        try:        #one way to check if key stroke will work on plot
     455            Parms,Parms2 = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,G2frame.PatternId, 'Instrument Parameters'))
     456        except TypeError:
     457            G2frame.G2plotNB.status.SetStatusText('Select '+plottype+' pattern first',1)
     458            return
    454459        newPlot = False
    455460        if event.key == 'w':
     
    611616
    612617            except TypeError:
    613                 G2frame.G2plotNB.status.SetStatusText('Select '+plottype+' powder pattern first',1)
     618                G2frame.G2plotNB.status.SetStatusText('Select '+plottype+' pattern first',1)
    614619               
    615620    def OnPress(event): #ugh - this removes a matplotlib error for mouse clicks in log plots                 
Note: See TracChangeset for help on using the changeset viewer.