select parents from relationship view
svn: r6284
This commit is contained in:
parent
eb66ad70ee
commit
ed9228aa8d
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user