Ignore:
Timestamp:
Aug 21, 2020 7:41:12 AM (16 months ago)
Author:
vondreele
Message:

reinstate wx.CallAfter? for ReloadFromGPX - needed to get reload to work properly
do AddToNotebook? inside reloadFromGPX after the load
Fix mpl 3.3 bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4549 r4552  
    50465046                if dlg2.ShowModal() == wx.ID_OK:
    50475047                    if refPlotUpdate: refPlotUpdate({},restore=True)
    5048                     self.reloadFromGPX
     5048                    wx.CallAfter(self.reloadFromGPX,rtext)
    50495049                else:
    50505050                    if refPlotUpdate: refPlotUpdate({},restore=True)
    5051                 self.AddToNotebook(rtext)
    50525051            finally:
    50535052                dlg2.Destroy()
     
    50555054            self.ErrorDialog('Refinement error',Msg)
    50565055           
    5057     def reloadFromGPX(self):
     5056    def reloadFromGPX(self,rtext=None):
    50585057        '''Deletes current data tree & reloads it from GPX file (after a
    50595058        refinemnt.) Done after events are completed to avoid crashes.
     5059        :param rtext str: string info from cller to be put in Notebook after reload
    50605060        '''
    50615061        self.GPXtree.DeleteChildren(self.root)
     
    50645064        self.TreeItemDelete = False  # tree has been repopulated; ignore previous deletions
    50655065        self.GPXtree.RestoreExposedItems() # reset exposed/hidden tree items
     5066        if rtext is not None:
     5067            self.AddToNotebook(rtext)
    50665068        self.ResetPlots()       
    50675069       
Note: See TracChangeset for help on using the changeset viewer.