* src/GrampsDbBase.py: add "request_rebuild" to encapsulate rebuild
requests in the database instance * src/ReadXML.py: use request_rebuild instead of directly emitting s ignals * src/ReadGedCom.py: use request_rebuild instead of directly emitting signals svn: r4292
This commit is contained in:
parent
81b7affc66
commit
1504585907
@ -1,3 +1,11 @@
|
|||||||
|
2005-04-04 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/GrampsDbBase.py: add "request_rebuild" to encapsulate rebuild
|
||||||
|
requests in the database instance
|
||||||
|
* src/ReadXML.py: use request_rebuild instead of directly emitting s
|
||||||
|
ignals
|
||||||
|
* src/ReadGedCom.py: use request_rebuild instead of directly emitting
|
||||||
|
signals
|
||||||
|
|
||||||
2005-04-01 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
|
2005-04-01 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
|
||||||
* src/GrampsDBCallback.py: Added code to disable/enable signals on
|
* src/GrampsDBCallback.py: Added code to disable/enable signals on
|
||||||
a per instance or all instance bassis. Improved test code and
|
a per instance or all instance bassis. Improved test code and
|
||||||
|
@ -249,6 +249,17 @@ class GrampsDbBase(GrampsDBCallback.GrampsDBCallback):
|
|||||||
"""
|
"""
|
||||||
return self.person_map != None
|
return self.person_map != None
|
||||||
|
|
||||||
|
def request_rebuild(self):
|
||||||
|
"""
|
||||||
|
Notifies clients that the data has change significantly, and that all
|
||||||
|
internal data dependent on the database should be rebuilt.
|
||||||
|
"""
|
||||||
|
self.emit('person-rebuild')
|
||||||
|
self.emit('family-rebuild')
|
||||||
|
self.emit('place-rebuild')
|
||||||
|
self.emit('source-rebuild')
|
||||||
|
self.emit('media-rebuild')
|
||||||
|
|
||||||
def commit_person(self,person,transaction,change_time=None):
|
def commit_person(self,person,transaction,change_time=None):
|
||||||
"""
|
"""
|
||||||
Commits the specified Person to the database, storing the changes
|
Commits the specified Person to the database, storing the changes
|
||||||
@ -957,11 +968,7 @@ class GrampsDbBase(GrampsDBCallback.GrampsDBCallback):
|
|||||||
self.undo_callback(_("_Undo %s") % transaction.get_description())
|
self.undo_callback(_("_Undo %s") % transaction.get_description())
|
||||||
|
|
||||||
if transaction and transaction.batch:
|
if transaction and transaction.batch:
|
||||||
self.emit('person-rebuild')
|
self.request_rebuild()
|
||||||
self.emit('family-rebuild')
|
|
||||||
self.emit('place-rebuild')
|
|
||||||
self.emit('source-rebuild')
|
|
||||||
self.emit('media-rebuild')
|
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
"""
|
"""
|
||||||
|
@ -498,10 +498,7 @@ class GedcomParser:
|
|||||||
if use_trans:
|
if use_trans:
|
||||||
self.db.transaction_commit(self.trans,_("GEDCOM import"))
|
self.db.transaction_commit(self.trans,_("GEDCOM import"))
|
||||||
else:
|
else:
|
||||||
self.db.emit('person-rebuild')
|
self.db.request_rebuild()
|
||||||
self.db.emit('family-rebuild')
|
|
||||||
self.db.emit('place-rebuild')
|
|
||||||
self.db.emit('source-rebuild')
|
|
||||||
|
|
||||||
if self.window:
|
if self.window:
|
||||||
self.infomsg("\n%s" % msg)
|
self.infomsg("\n%s" % msg)
|
||||||
|
@ -562,10 +562,7 @@ class GrampsParser:
|
|||||||
if use_trans:
|
if use_trans:
|
||||||
self.db.transaction_commit(self.trans,_("GRAMPS XML import"))
|
self.db.transaction_commit(self.trans,_("GRAMPS XML import"))
|
||||||
else:
|
else:
|
||||||
self.db.emit('person-rebuild')
|
self.db.request_rebuild()
|
||||||
self.db.emit('family-rebuild')
|
|
||||||
self.db.emit('place-rebuild')
|
|
||||||
self.db.emit('source-rebuild')
|
|
||||||
|
|
||||||
def start_lds_ord(self,attrs):
|
def start_lds_ord(self,attrs):
|
||||||
atype = attrs['type']
|
atype = attrs['type']
|
||||||
|
Loading…
Reference in New Issue
Block a user