From ecac99da0ec329ee4540710aba5da0689137c927 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 9 Mar 2006 01:55:03 +0000 Subject: [PATCH] family selection svn: r6107 --- ChangeLog | 3 +++ src/Editors/_EditFamily.py | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8ffa91864..bfc121f4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2006-03-08 Don Allingham + * src/Editors/_EditFamily.py: fix family selection + 2006-03-08 Alex Roitman * src/Editors/_EditFamily.py: Use tuple relations. * src/GramspDb/_GrampsBSDDB.py: Minor fixes. diff --git a/src/Editors/_EditFamily.py b/src/Editors/_EditFamily.py index dcc6d7c75..209bd2d2d 100644 --- a/src/Editors/_EditFamily.py +++ b/src/Editors/_EditFamily.py @@ -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,''),