In .:
* src/GrampsDb/_GrampsDbBase.py (DbState.change_database_noclose): Add new method. * src/Makefile.am (gdir_PYTHON): Ship new file. In po: 2006-05-17 Alex Roitman <shura@gramps-project.org> * POTFILES.in: Add new file. svn: r6699
This commit is contained in:
@@ -1097,6 +1097,7 @@ class GrampsBSDDB(GrampsDbBase):
|
||||
self.abort_possible = False
|
||||
# Undo is also impossible after batch transaction
|
||||
self.undoindex = -1
|
||||
self.translist = [None] * len(self.translist)
|
||||
transaction = BdbTransaction(msg,self.undodb,batch,no_magic)
|
||||
if transaction.batch:
|
||||
if self.UseTXN:
|
||||
|
@@ -1236,6 +1236,7 @@ class GrampsDbBase(GrampsDBCallback):
|
||||
self.undo_history_timestamp = time.time()
|
||||
# Undo is also impossible after batch transaction
|
||||
self.undoindex = -1
|
||||
self.translist = [None] * _UNDO_SIZE
|
||||
return Transaction(msg, self.undodb, batch)
|
||||
|
||||
def transaction_commit(self, transaction, msg):
|
||||
@@ -2134,6 +2135,9 @@ class DbState(GrampsDBCallback):
|
||||
|
||||
def change_database(self, database):
|
||||
self.db.close()
|
||||
self.change_database_noclose(database)
|
||||
|
||||
def change_database_noclose(self, database):
|
||||
self.db = database
|
||||
self.active = None
|
||||
self.open = True
|
||||
|
Reference in New Issue
Block a user