Changeset 4622


Ignore:
Timestamp:
Oct 26, 2020 9:40:53 AM (12 months ago)
Author:
vondreele
Message:

Put try/except/pass around block of code that seems to raise c++ errors (2744-2752 of G2plot.
comment out wx.Yield statements in G2dataGUI - now deprecated.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4620 r4622  
    50365036            dlg.Update(101.) # forces the Auto_Hide; needed after move w/Win & wx3.0
    50375037            dlg.Destroy()
    5038             wx.Yield()
     5038#            wx.Yield()
    50395039        if OK:
    50405040            Rw = Msg['Rwp']
     
    51065106            # selection above appears to trigger a tree event (all platforms?),
    51075107            # but if not call SelectDataTreeItem(self,Id)
    5108             wx.Yield()
     5108#            wx.Yield()
    51095109            time.sleep(0.1)
    51105110            pltNumber = self.G2plotNB.nb.GetSelection()
  • trunk/GSASIIplot.py

    r4616 r4622  
    27422742        G2frame.Bind(wx.EVT_MENU, onMovePeak, id=G2frame.dataWindow.movePeak.GetId())
    27432743    # save information needed to reload from tree and redraw
    2744     if not refineMode:
    2745         kwargs={'PatternName':G2frame.GPXtree.GetItemText(G2frame.PatternId)}
    2746         if G2frame.PickId:
    2747             kwargs['PickName'] = G2frame.GPXtree.GetItemText(G2frame.PickId)
    2748         G2frame.G2plotNB.RegisterRedrawRoutine(G2frame.G2plotNB.lastRaisedPlotTab,ReplotPattern,
    2749             (G2frame,newPlot,plotType),kwargs)
     2744    try:
     2745        if not refineMode:
     2746            kwargs={'PatternName':G2frame.GPXtree.GetItemText(G2frame.PatternId)}
     2747            if G2frame.PickId:
     2748                kwargs['PickName'] = G2frame.GPXtree.GetItemText(G2frame.PickId)
     2749            G2frame.G2plotNB.RegisterRedrawRoutine(G2frame.G2plotNB.lastRaisedPlotTab,ReplotPattern,
     2750                (G2frame,newPlot,plotType),kwargs)
     2751    except:         #skip a C++ error
     2752        pass
    27502753    # now start plotting
    27512754    G2frame.G2plotNB.status.DestroyChildren() #get rid of special stuff on status bar
Note: See TracChangeset for help on using the changeset viewer.