select parents from relationship view

svn: r6284
This commit is contained in:
Don Allingham 2006-04-07 02:57:05 +00:00
parent 54a86db801
commit 0a48d600e9

View File

@ -694,19 +694,20 @@ class FamilyView(PageView.PersonNavView):
dialog = SelectFamily(self.dbstate.db, _('Select Family'))
family = dialog.run()
person = self.dbstate.db.get_person_from_handle(self.dbstate.active.handle)
if family:
person = self.dbstate.db.get_person_from_handle(self.dbstate.active.handle)
family.add_child_handle(person.handle)
person.add_parent_family_handle(
family.handle,
(RelLib.Person.CHILD_BIRTH,''),
(RelLib.Person.CHILD_BIRTH,''))
trans = self.dbstate.db.transaction_begin()
self.dbstate.db.commit_person(person,trans)
self.dbstate.db.commit_family(family,trans)
self.dbstate.db.transaction_commit(trans,_("Add Family"))
family.add_child_handle(person.handle)
person.add_parent_family_handle(
family.handle,
(RelLib.Person.CHILD_BIRTH,''),
(RelLib.Person.CHILD_BIRTH,''))
trans = self.dbstate.db.transaction_begin()
self.dbstate.db.commit_person(person,trans)
self.dbstate.db.commit_family(family,trans)
self.dbstate.db.transaction_commit(trans,_("Add Family"))
def add_parent_family(self,obj,event,handle):
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1: