2006-05-21 Don Allingham <don@gramps-project.org>

* src/ViewManager.py: handle export, import, and save as if
	database does not exist, yet UIManager still wants to call them.



svn: r6748
This commit is contained in:
Don Allingham 2006-05-22 04:17:18 +00:00
parent b8f421b049
commit 546ae1a6ff
2 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2006-05-21 Don Allingham <don@gramps-project.org>
* src/ViewManager.py: handle export, import, and save as if
database does not exist, yet UIManager still wants to call them.
2006-05-21 Alex Roitman <shura@gramps-project.org> 2006-05-21 Alex Roitman <shura@gramps-project.org>
* configure.in: Set up for the next release. * configure.in: Set up for the next release.

View File

@ -694,6 +694,7 @@ class ViewManager:
self.pages[num].change_page() self.pages[num].change_page()
def import_data(self, obj): def import_data(self, obj):
if self.state.db.db_is_open:
self.db_loader.import_file() self.db_loader.import_file()
self.post_load() self.post_load()
@ -702,6 +703,7 @@ class ViewManager:
self.post_load_newdb(filename,filetype) self.post_load_newdb(filename,filetype)
def save_as_activate(self,obj): def save_as_activate(self,obj):
if self.state.db.db_is_open:
(filename,filetype) = self.db_loader.save_as() (filename,filetype) = self.db_loader.save_as()
self.post_load_newdb(filename,filetype) self.post_load_newdb(filename,filetype)
@ -874,6 +876,7 @@ class ViewManager:
pass pass
def export_data(self, obj): def export_data(self, obj):
if self.state.db.db_is_open:
import Exporter import Exporter
Exporter.Exporter(self.state, self.uistate) Exporter.Exporter(self.state, self.uistate)