Changeset 3962 for trunk/GSASIIplot.py


Ignore:
Timestamp:
May 9, 2019 1:59:10 PM (3 years ago)
Author:
toby
Message:

rework updating of plots after a refinement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r3961 r3962  
    542542            raise ValueError('Plot not found')
    543543
    544     def RaiseLastPage(self,lastRaisedPlotTab,treeItemPlot):
    545         '''Raises either the Last tab clicked on or what is drawn by the selected tree item
    546         This is called after a refinement is completed by :meth:`GSASIIdataGUI.GSASII.ResetPlots`
    547         '''
    548         plotNum = None
    549         if lastRaisedPlotTab in self.plotList:
    550             plotNum = self.plotList.index(lastRaisedPlotTab)
    551         elif treeItemPlot in self.plotList:
    552             plotNum = self.plotList.index(treeItemPlot)
    553         if plotNum is not None:
    554             wx.CallAfter(self.SetSelectionNoRefresh,plotNum)
     544    # def RaiseLastPage(self,lastRaisedPlotTab,treeItemPlot):
     545    #     '''Raises either the Last tab clicked on or what is drawn by the selected tree item
     546    #     This is called after a refinement is completed by :meth:`GSASIIdataGUI.GSASII.ResetPlots`
     547    #     '''
     548    #     plotNum = None
     549    #     if lastRaisedPlotTab in self.plotList:
     550    #         plotNum = self.plotList.index(lastRaisedPlotTab)
     551    #     elif treeItemPlot in self.plotList:
     552    #         plotNum = self.plotList.index(treeItemPlot)
     553    #     if plotNum is not None:
     554    #         wx.CallAfter(self.SetSelectionNoRefresh,plotNum)
    555555
    556556    def FindPlotTab(self,label,Type,newImage=True,publish=None):
     
    17561756            G2frame.PatternId = pId
    17571757        else:
     1758            if GSASIIpath.GetConfigValue('debug'): print('PatternName not found',PatternName)
    17581759            return
    17591760    if PickName == PatternName:
     
    17641765            G2frame.PickId = pId
    17651766        else:
     1767            if GSASIIpath.GetConfigValue('debug'): print('PickName not found',PickName)
    17661768            return
    17671769    elif GSASIIpath.GetConfigValue('debug'):
     
    27552757        G2frame.Bind(wx.EVT_MENU, onMovePeak, id=G2frame.dataWindow.movePeak.GetId())
    27562758    # save information needed to reload from tree and redraw
    2757     kwargs={'PatternName':G2frame.GPXtree.GetItemText(G2frame.PatternId)}
    2758     if G2frame.PickId:
    2759         kwargs['PickName'] = G2frame.GPXtree.GetItemText(G2frame.PickId)
    2760     #G2frame.G2plotNB.RegisterRedrawRoutine('Powder Patterns',ReplotPattern,
    2761     G2frame.G2plotNB.RegisterRedrawRoutine(G2frame.G2plotNB.lastRaisedPlotTab,ReplotPattern,
    2762                                            (G2frame,newPlot,plotType),kwargs)
     2759    if not refineMode:
     2760        kwargs={'PatternName':G2frame.GPXtree.GetItemText(G2frame.PatternId)}
     2761        if G2frame.PickId:
     2762            kwargs['PickName'] = G2frame.GPXtree.GetItemText(G2frame.PickId)
     2763        G2frame.G2plotNB.RegisterRedrawRoutine(G2frame.G2plotNB.lastRaisedPlotTab,ReplotPattern,
     2764                                            (G2frame,newPlot,plotType),kwargs)
    27632765    # now start plotting
    27642766    G2frame.G2plotNB.status.DestroyChildren() #get rid of special stuff on status bar
     
    53285330    W = []
    53295331    if 'C' in Parms['Type'][0]:
     5332        Plot.figure.suptitle(TreeItemText)
    53305333        Plot.set_title('Instrument and sample peak widths')
    53315334        Plot.set_xlabel(r'$Q, \AA^{-1}$',fontsize=14)
Note: See TracChangeset for help on using the changeset viewer.