Changeset 3543


Ignore:
Timestamp:
Aug 2, 2018 10:42:33 AM (3 years ago)
Author:
toby
Message:

try to fix Linux hang in G2PlotNoteBook.clear

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r3541 r3543  
    36063606                result = dlg.ShowModal()
    36073607                if result == wx.ID_OK:
    3608                     if GSASIIpath.GetConfigValue('debug'): print('DBG: Starting cleanup')
     3608                    #if GSASIIpath.GetConfigValue('debug'): print('DBG: Starting cleanup')
    36093609                    self.GPXtree.DeleteChildren(self.root)
    3610                     if GSASIIpath.GetConfigValue('debug'): print('DBG: DeleteChildren done')
     3610                    #if GSASIIpath.GetConfigValue('debug'): print('DBG: DeleteChildren done')
    36113611                    self.GSASprojectfile = ''
    36123612                    self.HKL = []
    36133613                    if self.G2plotNB.plotList:
    36143614                        self.G2plotNB.clear()
    3615                     if GSASIIpath.GetConfigValue('debug'): print('DBG: cleanup done')
     3615                    #if GSASIIpath.GetConfigValue('debug'): print('DBG: cleanup done')
    36163616            finally:
    36173617                dlg.Destroy()
  • trunk/GSASIIplot.py

    r3509 r3543  
    641641    def clear(self):
    642642        'clear all pages from plot window'
    643         while self.nb.GetPageCount():
    644             self.nb.DeletePage(0)
     643        for i in range(self.nb.GetPageCount()-1,-1,-1):
     644            self.nb.DeletePage(i)
    645645        self.plotList = []
    646646        self.panelList = []
Note: See TracChangeset for help on using the changeset viewer.