From 1269fcb4b1c37d3ce6cf0fffee412d336c22ae9c Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 31 Jan 2007 02:03:37 +0000 Subject: [PATCH] * src/plugins/EventCmp.py: (#886) properly handle CANCEL on save dialog svn: r8017 --- ChangeLog | 1 + src/plugins/EventCmp.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 196e3d482..3a41d8cbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ 2007-01-30 Don Allingham + * src/plugins/EventCmp.py: (#886) properly handle CANCEL on save dialog * src/ReportBase/_ReportDialog.py: error reporting * src/plugins/NarrativeWeb.py: error reporting diff --git a/src/plugins/EventCmp.py b/src/plugins/EventCmp.py index 906b8e6e8..882bd2c5b 100644 --- a/src/plugins/EventCmp.py +++ b/src/plugins/EventCmp.py @@ -414,11 +414,11 @@ class DisplayChart(ManagedWindow.ManagedWindow): f.set_current_folder(os.getcwd()) status = f.run() - name = unicode(f.get_filename(), - sys.getfilesystemencoding()) - f.destroy() + f.hide() if status == gtk.RESPONSE_OK: + name = unicode(f.get_filename(), + sys.getfilesystemencoding()) pstyle = BaseDoc.PaperStyle("junk",10,10) doc = ODSDoc.ODSDoc(pstyle,BaseDoc.PAPER_PORTRAIT) doc.creator(self.db.get_researcher().get_name()) @@ -444,6 +444,7 @@ class DisplayChart(ManagedWindow.ManagedWindow): spreadsheet.write_table_data(top,skip_columns) spreadsheet.finalize() + f.destroy() #------------------------------------------------------------------------ #