* src/DbLoader.py (DbLoader.save_as): Prohibit SaveAs into the
currently opened database. (DbLoader.import_file): Prohibit importing from the currently opened database. svn: r7724
This commit is contained in:
parent
8ab76ad2cf
commit
ae9b954e29
@ -1,4 +1,8 @@
|
||||
2006-11-27 Alex Roitman <shura@gramps-project.org>
|
||||
* src/DbLoader.py (DbLoader.save_as): Prohibit SaveAs into the
|
||||
currently opened database.
|
||||
(DbLoader.import_file): Prohibit importing from the currently
|
||||
opened database.
|
||||
* src/GrampsDb/_WriteXML.py (dump_person_ref): Properly export
|
||||
associations.
|
||||
|
||||
|
@ -213,6 +213,10 @@ class DbLoader:
|
||||
if self.check_errors(filename):
|
||||
return ('','')
|
||||
|
||||
# Do not allow saving as into the currently open file
|
||||
if filename == self.dbstate.db.full_name:
|
||||
return ('','')
|
||||
|
||||
filetype = type_selector.get_value()
|
||||
if filetype == 'auto':
|
||||
try:
|
||||
@ -300,6 +304,10 @@ class DbLoader:
|
||||
if self.check_errors(filename):
|
||||
return False
|
||||
|
||||
# Do not allow importing from the currently open file
|
||||
if filename == self.dbstate.db.full_name:
|
||||
return False
|
||||
|
||||
filetype = type_selector.get_value()
|
||||
if filetype == 'auto':
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user