Changeset 2879 for trunk/GSASIIgrid.py
- Timestamp:
- Jun 26, 2017 5:04:06 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIgrid.py
r2876 r2879 2968 2968 plotName = plotSpCharFix(plotName) 2969 2969 return plotName,G2frame.colList[col],G2frame.colSigs[col] 2970 2971 def PlotSelect(event): 2972 'Plots a row (covariance) or column on double-click' 2970 2971 def PlotSelectedColRow(calltyp=''): 2972 '''Called to plot a selected column or row. This is called after the event is processed 2973 so that the column or row gets selected. 2974 Single click on row: plots histogram 2975 Double click on row: plots V-C matrix 2976 Single or double click on column: plots values in column 2977 ''' 2973 2978 cols = G2frame.dataDisplay.GetSelectedCols() 2974 2979 rows = G2frame.dataDisplay.GetSelectedRows() 2975 2980 if cols: 2976 2981 G2plt.PlotSelectedSequence(G2frame,cols,GetColumnInfo,SelectXaxis) 2982 elif rows and calltyp == 'single': 2983 name = histNames[rows[0]] #only does 1st one selected 2984 if not name.startswith('PWDR'): return 2985 pickId = G2frame.PickId 2986 G2frame.PickId = G2frame.PatternId = GetPatternTreeItemId(G2frame, G2frame.root, name) 2987 G2plt.PlotPatterns(G2frame,newPlot=True,plotType='PWDR') 2988 G2frame.PickId = pickId 2977 2989 elif rows: 2978 2990 name = histNames[rows[0]] #only does 1st one selected … … 2983 2995 'Nothing selected in table. Click on column or row label(s) to plot. N.B. Grid selection can be a bit funky.' 2984 2996 ) 2997 2998 def PlotSSelect(event): 2999 'Called by a single click on a row or column label. ' 3000 event.Skip() 3001 wx.CallAfter(PlotSelectedColRow,'single') 3002 3003 def PlotSelect(event): 3004 'Called by a double-click on a row or column label' 3005 event.Skip() 3006 wx.CallAfter(PlotSelectedColRow,'double') 2985 3007 2986 3008 def OnPlotSelSeq(event): … … 4109 4131 for r in range(nRows): 4110 4132 G2frame.dataDisplay.SetCellReadOnly(r,c) 4133 G2frame.dataDisplay.Bind(wg.EVT_GRID_LABEL_LEFT_CLICK, PlotSSelect) 4111 4134 G2frame.dataDisplay.Bind(wg.EVT_GRID_LABEL_LEFT_DCLICK, PlotSelect) 4112 4135 G2frame.dataDisplay.Bind(wg.EVT_GRID_LABEL_RIGHT_CLICK, SetLabelString)
Note: See TracChangeset
for help on using the changeset viewer.