family selection

svn: r6107
This commit is contained in:
Don Allingham 2006-03-09 01:55:03 +00:00
parent 488435d166
commit e5847754d1
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,6 @@
2006-03-08 Don Allingham <don@gramps-project.org>
* src/Editors/_EditFamily.py: fix family selection
2006-03-08 Alex Roitman <shura@gramps-project.org>
* src/Editors/_EditFamily.py: Use tuple relations.
* src/GramspDb/_GrampsBSDDB.py: Minor fixes.

View File

@ -494,8 +494,11 @@ class EditFamily(EditPrimary):
for i in box.get_children():
box.remove(i)
btn_obj.remove(btn_obj.get_children()[0])
try:
btn_obj.remove(btn_obj.get_children()[0])
except IndexError:
pass
if is_used:
db = self.db
@ -536,7 +539,7 @@ class EditFamily(EditPrimary):
self.db.commit_person(person,trans)
if new_handle:
person = self.db.get_person_from_handle(orig_handle)
if self.obj.handle not in self.obj.family_list:
if self.obj.handle not in person.family_list:
person.family_list.append(self.obj.handle)
self.db.commit_person(person,trans)
@ -566,7 +569,7 @@ class EditFamily(EditPrimary):
# for each child, add the family handle to the child
for handle in self.obj.get_child_handle_list():
child = self.db.get_person_from_handle(handle)
# fix
# fix - relationships need to be extracted from the list
child.add_parent_family_handle(handle,
(RelLib.Person.CHILD_BIRTH,''),
(RelLib.Person.CHILD_BIRTH,''),