From 8b699f8664b729ca9982a03ecab906167b35f195 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sat, 26 Oct 2002 14:44:59 +0000 Subject: [PATCH] Patch to prevent overlaps from Billy Earney svn: r1149 --- gramps/src/GraphLayout.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gramps/src/GraphLayout.py b/gramps/src/GraphLayout.py index 5b15db81e..4f6ba9ae2 100644 --- a/gramps/src/GraphLayout.py +++ b/gramps/src/GraphLayout.py @@ -59,11 +59,12 @@ class DescendLine(GraphLayout): self.maxy = pos self.elist.pop() - def depth(self,person,val=1.0): + def depth(self,person,val=0): for family in person.getFamilyList(): clist = family.getChildList() val = val + len(clist) for child in clist: - val = self.depth(child,val) - val = val - 1.0 - return val + d=self.depth(child) + if d > 0: + val = val + d - 1 #first child is always on the same + return val #row as the parent, so subtract 1