From da16f6cee7a90978cdb041997d814db748271713 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Sat, 20 Jun 2015 15:00:02 -0400 Subject: [PATCH] Fix closing of progress dialogs --- gui/mainFrame.py | 7 +++---- gui/utils/exportHtml.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gui/mainFrame.py b/gui/mainFrame.py index 6b2b893ec..efdd2562b 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -565,7 +565,7 @@ class MainFrame(wx.Frame): if (dlg.ShowModal() == wx.ID_OK): self.progressDialog = wx.ProgressDialog( "Importing fits", - " "*100, # set some arbitrary spacing to create wifth in window + " "*100, # set some arbitrary spacing to create width in window parent=self, style = wx.PD_APP_MODAL | wx.PD_ELAPSED_TIME) self.progressDialog.message = None sFit.importFitsThreaded(dlg.GetPaths(), self.fileImportCallback) @@ -584,7 +584,7 @@ class MainFrame(wx.Frame): if info == -1: # Done processing - self.progressDialog.Hide() + self.progressDialog.Destroy() self._openAfterImport(fits) elif info != self.progressDialog.message and info is not None: # New message, overwrite cached message and update @@ -624,13 +624,12 @@ class MainFrame(wx.Frame): "Backing up %d fits to: %s"%(max, filePath), maximum=max, parent=self, style=wx.PD_APP_MODAL | wx.PD_ELAPSED_TIME) - sFit.backupFits(filePath, self.backupCallback) self.progressDialog.ShowModal() def backupCallback(self, info): if info == -1: - self.progressDialog.Hide() + self.progressDialog.Destroy() else: self.progressDialog.Update(info) diff --git a/gui/utils/exportHtml.py b/gui/utils/exportHtml.py index 726bec265..838bae3e5 100644 --- a/gui/utils/exportHtml.py +++ b/gui/utils/exportHtml.py @@ -136,7 +136,7 @@ class exportHtmlThread(threading.Thread): categoryList = list(sMkt.getShipRoot()) categoryList.sort(key=lambda ship: ship.name) - count = 1 + count = 0 for group in categoryList: # init market group string to give ships something to attach to