From e352461f945ebb476e5f8e46f24b4d4890b84c3e Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 24 Mar 2002 16:49:58 +0000 Subject: [PATCH] Fixed Pedigree View for new preferred family concept svn: r856 --- gramps/src/PedView.py | 13 ++++--------- gramps/src/RelLib.py | 4 ++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/gramps/src/PedView.py b/gramps/src/PedView.py index c0c536aaa..e77369b9c 100644 --- a/gramps/src/PedView.py +++ b/gramps/src/PedView.py @@ -382,15 +382,10 @@ class PedigreeView: if depth > 5 or person == None: return - family = person.getMainFamily() - frel = 0 - mrel = 0 - if family == None: - l = person.getAltFamilyList() - if len(l) > 0: - (family,m,f) = l[0] - mrel = (m != "Birth") - frel = (f != "Birth") + (family,m,f) = person.getMainFamilyRel() + if family: + mrel = (m != "Birth") + frel = (f != "Birth") list[index] = (person,val) if family != None: diff --git a/gramps/src/RelLib.py b/gramps/src/RelLib.py index 119c44d89..4cd8c724c 100644 --- a/gramps/src/RelLib.py +++ b/gramps/src/RelLib.py @@ -1120,9 +1120,9 @@ class Person: """returns the main Family of the Person, the Family in which the Person is a natural born child""" if len(self.AltFamilyList) == 0: - return None + return (None,None,None) else: - return self.AltFamilyList + return self.AltFamilyList[0] def setNote(self,text): """sets the note attached to the Person to the passed text"""