* src/FamilyView.py: ignore None family types. This should never

occur, but we want to be safe.


svn: r4330
This commit is contained in:
Don Allingham 2005-04-09 22:20:15 +00:00
parent 62bdc36e2b
commit 3c2e3536ea
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2005-04-09 Don Allingham <don@gramps-project.org>
* src/FamilyView.py: ignore None family types. This should never
occur, but we want to be safe.
2005-04-09 Alex Roitman <shura@gramps-project.org>
* src/po/template.po: Update translation template.

View File

@ -1069,8 +1069,12 @@ class FamilyView:
selection = tree.get_selection()
family_list = person.get_parent_family_handle_list()
count = 0
for (f,mrel,frel) in family_list:
fam = self.parent.db.get_family_from_handle(f)
if not fam:
continue
count += 1
father_handle = fam.get_father_handle()
mother_handle = fam.get_mother_handle()
f = self.parent.db.get_person_from_handle(father_handle)
@ -1086,7 +1090,7 @@ class FamilyView:
sel = node
v = "%s\n%s" % (father,mother)
model.set(node,0,v)
if len(family_list) > 1:
if count > 1:
selection.set_mode(gtk.SELECTION_SINGLE)
selection.select_iter(sel)
else: