Changeset 2540 for trunk/GSASIIplot.py
- Timestamp:
- Nov 21, 2016 1:04:32 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r2538 r2540 1214 1214 ''' 1215 1215 global exclLines 1216 global DifLine 1216 global DifLine # BHT: probably does not need to be global 1217 1217 global Ymax 1218 1218 global Pattern … … 1423 1423 '''Respond to a menu command to move the difference curve. 1424 1424 ''' 1425 if not DifLine[0]: 1426 print('No difference curve!') 1427 return 1425 1428 G2frame.itemPicked = DifLine[0] 1426 1429 G2frame.G2plotNB.Parent.Raise() … … 1813 1816 G2frame.dataFrame.Bind(wx.EVT_MENU, onMoveTopTick, id=G2frame.dataFrame.moveTickLoc.GetId()) 1814 1817 G2frame.dataFrame.Bind(wx.EVT_MENU, onMoveTickSpace, id=G2frame.dataFrame.moveTickSpc.GetId()) 1815 if len(Page.phaseList) == 0: 1816 G2frame.dataFrame.moveTickLoc.Enable(False) 1817 G2frame.dataFrame.moveTickSpc.Enable(False) 1818 elif len(Page.phaseList) == 1: 1819 G2frame.dataFrame.moveTickLoc.Enable(True) 1820 G2frame.dataFrame.moveTickSpc.Enable(False) 1821 else: 1822 G2frame.dataFrame.moveTickLoc.Enable(True) 1823 G2frame.dataFrame.moveTickSpc.Enable(True) 1818 G2frame.dataFrame.moveDiffCurve.Enable(False) 1819 G2frame.dataFrame.moveTickLoc.Enable(False) 1820 G2frame.dataFrame.moveTickSpc.Enable(False) 1824 1821 elif G2frame.PatternTree.GetItemText(G2frame.PickId) == 'Peak List': 1825 1822 G2frame.dataFrame.Bind(wx.EVT_MENU, onMovePeak, id=G2frame.dataFrame.movePeak.GetId()) … … 1833 1830 # now start plotting 1834 1831 G2frame.G2plotNB.status.DestroyChildren() 1832 Page.tickDict = {} 1833 DifLine = [''] 1835 1834 if G2frame.Contour: 1836 1835 Page.Choice = (' key press','d: lower contour max','u: raise contour max','o: reset contour max', … … 2042 2041 X += 0.002*offsetX*DX*N 2043 2042 Xum = ma.getdata(X) 2044 DifLine = ['']2045 2043 if ifpicked: 2046 2044 if G2frame.plotStyle['sqrtPlot']: … … 2202 2200 refColors=['b','r','c','g','m','k'] 2203 2201 Phases = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId,'Reflection Lists')) 2204 Page.tickDict = {}2205 2202 for pId,phase in enumerate(Page.phaseList): 2206 2203 if 'list' in str(type(Phases[phase])): … … 2274 2271 # and sqrt(-ve) in np.where usage 2275 2272 # G2frame.Pwdr = True 2273 if 'PWDR' in G2frame.PatternTree.GetItemText(G2frame.PickId): 2274 if len(Page.tickDict.keys()) == 1: 2275 G2frame.dataFrame.moveTickLoc.Enable(True) 2276 elif len(Page.tickDict.keys()) > 1: 2277 G2frame.dataFrame.moveTickLoc.Enable(True) 2278 G2frame.dataFrame.moveTickSpc.Enable(True) 2279 if DifLine[0]: 2280 G2frame.dataFrame.moveDiffCurve.Enable(True) 2276 2281 2277 2282 ################################################################################
Note: See TracChangeset
for help on using the changeset viewer.