Fixed several reported bugs
svn: r999
This commit is contained in:
parent
f43c587f2b
commit
55ff500cfe
@ -82,11 +82,28 @@ class DetAncestorReport(Report):
|
||||
#print "Children= ", len(family.getChildList())
|
||||
if num_children > 0:
|
||||
self.doc.start_paragraph("ChildTitle")
|
||||
mother= family.getMother().getPrimaryName().getRegularName()
|
||||
father= family.getFather().getPrimaryName().getRegularName()
|
||||
mom = family.getMother()
|
||||
dad = family.getFather()
|
||||
if mom:
|
||||
mother = mom.getPrimaryName().getRegularName()
|
||||
if dad:
|
||||
father = dad.getPrimaryName().getRegularName()
|
||||
|
||||
if num_children == 1:
|
||||
self.doc.write_text(_("Child of %s and %s is:") % (mother, father))
|
||||
else: self.doc.write_text(_("Children of %s and %s are:") % (mother, father))
|
||||
if mom and dad:
|
||||
self.doc.write_text(_("Child of %s and %s is:") % (mother, father))
|
||||
elif mom:
|
||||
self.doc.write_text(_("Child of %s is:") % mother)
|
||||
elif dad:
|
||||
self.doc.write_text(_("Child of %s is:") % father)
|
||||
else:
|
||||
if mom and dad:
|
||||
self.doc.write_text(_("Children of %s and %s are:") % (mother, father))
|
||||
elif mom:
|
||||
self.doc.write_text(_("Children of %s are:") % mother)
|
||||
elif dad:
|
||||
self.doc.write_text(_("Children of %s are:") % father)
|
||||
|
||||
self.doc.end_paragraph()
|
||||
|
||||
for child in family.getChildList():
|
||||
|
@ -287,9 +287,9 @@ def write_dot(file, ind_list, orien, width, height, tb_margin,
|
||||
file.write("center=1;\n")
|
||||
file.write("margin=0.5;\n")
|
||||
file.write("ratio=fill;\n")
|
||||
file.write("size=\"%3.1f,%3.1f\";\n" % ((width*hpages)-(lr_margin*2)-((hpages-1)*1.0),
|
||||
file.write("size=\"%3.1fin,%3.1fin\";\n" % ((width*hpages)-(lr_margin*2)-((hpages-1)*1.0),
|
||||
(height*vpages)-(tb_margin*2)-((vpages-1)*1.0)))
|
||||
file.write("page=\"%3.1f,%3.1f\";\n" % (width,height))
|
||||
file.write("page=\"%3.1fin,%3.1fin\";\n" % (width,height))
|
||||
|
||||
if orien == PAPER_LANDSCAPE:
|
||||
file.write("rotate=90;\n")
|
||||
|
Loading…
Reference in New Issue
Block a user