Changeset 4841


Ignore:
Timestamp:
Mar 6, 2021 11:23:19 AM (8 months ago)
Author:
toby
Message:

fix bind problem w/Sequential plots; open sequential fit tree item on start

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4840 r4841  
    43554355        Id = 0
    43564356        phaseId = None
     4357        seqId = None
    43574358        G2IO.ProjFileOpen(self)
    43584359        self.GPXtree.SetItemText(self.root,'Project: '+self.GSASprojectfile)
     
    43684369                    else:
    43694370                        Id = item
     4371            elif name.startswith("Sequential") and self.testSeqRefineMode():
     4372                seqId = item
    43704373            elif name == "Phases":
    43714374                phaseId = item
     
    43774380        if phaseId: # show all phases
    43784381            self.GPXtree.Expand(phaseId)
    4379         if Id:
     4382        if seqId:
     4383            self.EnablePlot = True
     4384            SelectDataTreeItem(self,seqId)
     4385            self.GPXtree.SelectItem(seqId)  # needed on OSX or item is not selected in tree; perhaps not needed elsewhere
     4386        elif Id:
    43804387            self.EnablePlot = True
    43814388            self.GPXtree.Expand(Id)
  • trunk/GSASIIplot.py

    r4840 r4841  
    69566956        elif event.key == 'l':
    69576957            G2frame.seqLines = not G2frame.seqLines
    6958         wx.CallAfter(Draw)
    6959 
    6960     def Draw():
     6958        wx.CallAfter(SeqDraw)
     6959
     6960    def SeqDraw():
    69616961        global Title,xLabel,yLabel
     6962        Plot=Page.figure.gca()
    69626963        G2frame.G2plotNB.status.SetStatusText(
    69636964            'press L to toggle lines, S to select X axis, T to change titles (reselect column to show?)',1)
     
    70137014                Page.fitvals = Page.fitvals[::-1]
    70147015            Plot.plot(X,Page.fitvals,label='Fit',color=colors[(ic+2)%NC])
    7015            
     7016
     7017        #### Begin self.testSeqRefineMode() =====================
    70167018        Plot.legend(loc='best')
    70177019        if Title:
     
    70287030            Plot.set_ylabel('Parameter values')
    70297031        Page.canvas.draw()
    7030            
     7032
    70317033    G2frame.seqXselect = SelectX
    70327034    try:
     
    70527054    Page.fitvals = fitvals
    70537055       
    7054     Draw()
     7056    SeqDraw()
    70557057               
    70567058##### PlotExposedImage & PlotImage ################################################################################
Note: See TracChangeset for help on using the changeset viewer.