@@ -1649,17 +1649,17 @@ def onPartialConfig(event):
16491649 G2frame .SubBack = False
16501650 Page .plotStyle ['logPlot' ] = False
16511651 # is the selected histogram in the refinement? if not pick the 1st to show
1652+ # instead select the first powder pattern and plot it
16521653 Histograms ,Phases = G2frame .GetUsedHistogramsAndPhasesfromTree ()
1653- if plottingItem not in Histograms :
1654+ if plottingItem not in Histograms :
1655+ # current plotted item is not in refinement
16541656 histoList = [i for i in Histograms .keys () if i .startswith ('PWDR ' )]
16551657 if len (histoList ) != 0 :
16561658 plottingItem = histoList [0 ]
1657- Id = G2gd .GetGPXtreeItemId (G2frame , G2frame .root , plottingItem )
1658- G2frame .GPXtree .SelectItem (Id )
1659- PlotPatterns (G2frame ,newPlot ,plotType ,None ,extraKeys ,refineMode )
1660- # wx.CallAfter(PlotPatterns,G2frame,newPlot,plotType,None,
1661- # extraKeys,refineMode)
1662- return
1659+ G2frame .PatternId = G2gd .GetGPXtreeItemId (G2frame , G2frame .root , plottingItem )
1660+ data = G2frame .GPXtree .GetItemPyData (G2frame .PatternId )
1661+ G2frame .GPXtree .SelectItem (G2frame .PatternId )
1662+ PlotPatterns (G2frame ,True ,plotType ,None ,extraKeys )
16631663 #=====================================================================================
16641664 if not new :
16651665 G2frame .xylim = copy .copy (limits )
0 commit comments