2007-12-31 Gary Burton <gary.burton@zen.co.uk>
* src/DataViews/RelationView.py: * src/Editors/_EditFamily.py: Add a signal handler for changes to events. bug #1416 and #1329. Also remove previous attempt at fixing #1416 now that I know a bit more about how signal handling works. svn: r9660
This commit is contained in:
parent
122c77e2de
commit
9726d358bd
@ -1,3 +1,9 @@
|
|||||||
|
2007-12-31 Gary Burton <gary.burton@zen.co.uk>
|
||||||
|
* src/DataViews/RelationView.py:
|
||||||
|
* src/Editors/_EditFamily.py: Add a signal handler for changes to events.
|
||||||
|
bug #1416 and #1329. Also remove previous attempt at fixing #1416 now that
|
||||||
|
I know a bit more about how signal handling works.
|
||||||
|
|
||||||
2007-12-31 Douglas S. Blank <dblank@cs.brynmawr.edu>
|
2007-12-31 Douglas S. Blank <dblank@cs.brynmawr.edu>
|
||||||
* src/plugins/DefaultGadgets.py: added Date to environment
|
* src/plugins/DefaultGadgets.py: added Date to environment
|
||||||
* src/gen/lib/date.py: added new Date constructor type: Date(y,m,d)
|
* src/gen/lib/date.py: added new Date constructor type: Date(y,m,d)
|
||||||
|
@ -161,6 +161,9 @@ class RelationshipView(PageView.PersonNavView):
|
|||||||
self.redraw()
|
self.redraw()
|
||||||
|
|
||||||
def connect_to_db(self, db):
|
def connect_to_db(self, db):
|
||||||
|
# Add a signal to pick up event changes, bug #1416
|
||||||
|
db.connect('event-update', self.family_update)
|
||||||
|
|
||||||
db.connect('person-update', self.person_update)
|
db.connect('person-update', self.person_update)
|
||||||
db.connect('person-rebuild', self.person_rebuild)
|
db.connect('person-rebuild', self.person_rebuild)
|
||||||
db.connect('family-update', self.family_update)
|
db.connect('family-update', self.family_update)
|
||||||
|
@ -426,6 +426,9 @@ class EditFamily(EditPrimary):
|
|||||||
|
|
||||||
self._add_db_signal('family-update', self.check_for_family_change)
|
self._add_db_signal('family-update', self.check_for_family_change)
|
||||||
self._add_db_signal('family-delete', self.check_for_close)
|
self._add_db_signal('family-delete', self.check_for_close)
|
||||||
|
|
||||||
|
# Add a signal pick up changes to events, bug #1329
|
||||||
|
self._add_db_signal('event-update', self.event_updated)
|
||||||
|
|
||||||
self.added = self.obj.handle == None
|
self.added = self.obj.handle == None
|
||||||
if self.added:
|
if self.added:
|
||||||
@ -457,6 +460,9 @@ class EditFamily(EditPrimary):
|
|||||||
"database is not corrupted, GRAMPS has updated the family to "
|
"database is not corrupted, GRAMPS has updated the family to "
|
||||||
"reflect these changes. Any edits you have made may have been lost."))
|
"reflect these changes. Any edits you have made may have been lost."))
|
||||||
|
|
||||||
|
def event_updated(self, obj):
|
||||||
|
self.load_data()
|
||||||
|
|
||||||
def reload_people(self):
|
def reload_people(self):
|
||||||
fhandle = self.obj.get_father_handle()
|
fhandle = self.obj.get_father_handle()
|
||||||
self.update_father(fhandle)
|
self.update_father(fhandle)
|
||||||
@ -942,14 +948,6 @@ class EditFamily(EditPrimary):
|
|||||||
else:
|
else:
|
||||||
self.db.commit_family(self.obj,trans)
|
self.db.commit_family(self.obj,trans)
|
||||||
self.db.transaction_commit(trans,_("Edit Family"))
|
self.db.transaction_commit(trans,_("Edit Family"))
|
||||||
else:
|
|
||||||
# Signal an update to allow other windows that use family data to
|
|
||||||
# refresh. The family-update signal is normally only emitted when
|
|
||||||
# the family record itself changes, however the Relationship view
|
|
||||||
# needs to know to refresh when related data such as the marriage
|
|
||||||
# event may have been altered.
|
|
||||||
# Bug #1416
|
|
||||||
self.db.emit('family-update', ([],))
|
|
||||||
|
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user