diff --git a/gramps/gen/db/generic.py b/gramps/gen/db/generic.py index c6c622798..2f0622d09 100644 --- a/gramps/gen/db/generic.py +++ b/gramps/gen/db/generic.py @@ -860,11 +860,6 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback): """ if transaction.batch: self.env.txn_checkpoint() - # Only build surname list after surname index is surely back - self.build_surname_list() - # FIXME: need a User GUI update callback here: - self.reindex_reference_map(lambda percent: percent) - # Reset callbacks if necessary if transaction.batch or not len(transaction): return diff --git a/gramps/plugins/database/dbapi.py b/gramps/plugins/database/dbapi.py index d8ef2332d..23deaafdb 100644 --- a/gramps/plugins/database/dbapi.py +++ b/gramps/plugins/database/dbapi.py @@ -341,6 +341,10 @@ class DBAPI(DbGeneric): """ Executed after a batch operation. """ + if txn.batch: + self.build_surname_list() + # FIXME: need a User GUI update callback here: + self.reindex_reference_map(lambda percent: percent) self.dbapi.commit() self.transaction = None msg = txn.get_description()