Patch to prevent overlaps from Billy Earney

svn: r1149
This commit is contained in:
Don Allingham 2002-10-26 14:44:59 +00:00
parent c4916b22f9
commit 8b699f8664

View File

@ -59,11 +59,12 @@ class DescendLine(GraphLayout):
self.maxy = pos self.maxy = pos
self.elist.pop() self.elist.pop()
def depth(self,person,val=1.0): def depth(self,person,val=0):
for family in person.getFamilyList(): for family in person.getFamilyList():
clist = family.getChildList() clist = family.getChildList()
val = val + len(clist) val = val + len(clist)
for child in clist: for child in clist:
val = self.depth(child,val) d=self.depth(child)
val = val - 1.0 if d > 0:
return val val = val + d - 1 #first child is always on the same
return val #row as the parent, so subtract 1