From ff349b36e46bae66a88fc3d6381c6fb84e388eee Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Wed, 23 Feb 2005 04:46:51 +0000 Subject: [PATCH] * src/gramps_main.py (on_new_clicked): Do not prematurely close db. * src/DbPrompter.py (NewNativeDbPrompter.chooser): Close old db if positively opening a new one. svn: r4082 --- ChangeLog | 4 ++++ src/DbPrompter.py | 1 + src/gramps_main.py | 1 - 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2cacf725b..d534a7b14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,10 @@ * src/Exporter.py (native_export): Use real export. * src/WriteGrdb.py (exportData): Provide default cl value. + * src/gramps_main.py (on_new_clicked): Do not prematurely close db. + * src/DbPrompter.py (NewNativeDbPrompter.chooser): Close old db + if positively opening a new one. + 2005-02-21 Don Allingham * Release: Version 1.1.90 "Successful encyclopedia salesman" released. diff --git a/src/DbPrompter.py b/src/DbPrompter.py index 0358dfb9d..1b90156e4 100644 --- a/src/DbPrompter.py +++ b/src/DbPrompter.py @@ -365,6 +365,7 @@ class NewNativeDbPrompter: if os.path.splitext(filename)[1] != ".grdb": filename = filename + ".grdb" choose.destroy() + self.parent.db.close() self.parent.db = GrampsBSDDB.GrampsBSDDB() self.parent.read_file(filename) # Add the file to the recent items diff --git a/src/gramps_main.py b/src/gramps_main.py index 90d5acb56..7c4dc1c31 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -977,7 +977,6 @@ class Gramps: def on_new_clicked(self,obj): """Prompt for permission to close the current database""" - self.db.close() prompter = DbPrompter.NewNativeDbPrompter(self,self.topWindow) prompter.chooser()