Fixed report problems and handling of the active spouse

svn: r62
This commit is contained in:
Don Allingham 2001-05-26 14:58:06 +00:00
parent 5d4e64102f
commit 4e0a6483ff
3 changed files with 12 additions and 5 deletions

View File

@ -123,7 +123,7 @@ class PdfDoc(TextDoc):
def end_paragraph(self):
if self.in_table == 0 and self.image == 0:
self.story.append(Paragraph(self.text,self.current_para))
self.story.append(Spacer(1,0.25*cm))
self.story.append(Spacer(1,0.5*cm))
else:
self.image = 0
@ -154,7 +154,7 @@ class PdfDoc(TextDoc):
colWidths=self.cur_table_cols,
style=ts)
self.story.append(tbl)
self.story.append(Spacer(1,0.25*cm))
self.story.append(Spacer(1,0.5*cm))
self.in_table = 0
def start_row(self):
@ -223,7 +223,7 @@ class PdfDoc(TextDoc):
act_height = int(ny * scale)
self.story.append(Image(name,act_width*0.5,act_height*0.5))
self.story.append(Spacer(1,0.25*cm))
self.story.append(Spacer(1,0.5*cm))
self.image = 1
def horizontal_line(self):

View File

@ -1442,8 +1442,6 @@ def on_filter_name_changed(obj):
#
#-------------------------------------------------------------------------
def on_spouselist_changed(obj):
global active_spouse
if active_person == None :
return
@ -1691,6 +1689,7 @@ def load_tree_values(person,index,max,pv_text,tip):
def display_marriage(family):
global active_child
global active_family
global active_spouse
active_family = family
clist = Main.get_widget("child_list")
@ -1702,6 +1701,11 @@ def display_marriage(family):
i = 0
if family != None:
if active_person.getGender() == Person.male:
active_spouse = family.getMother()
else:
active_spouse = family.getFather()
child_list = family.getChildList()
child_list.sort(sort.by_birthdate)
for child in child_list:

View File

@ -114,6 +114,7 @@ class AncestorReport:
para.set_header_level(1)
para.set_top_border(0.2)
para.set_bottom_border(0.2)
para.set_padding(1)
self.doc.add_style("Title",para)
font = FontStyle()
@ -126,11 +127,13 @@ class AncestorReport:
para.set_header_level(2)
para.set_top_border(0.15)
para.set_bottom_border(0.15)
para.set_padding(1)
self.doc.add_style("Header",para)
para = ParagraphStyle()
para.set_first_indent(-0.75)
para.set_left_margin(1.0)
para.set_padding(1)
self.doc.add_style("ListEntry",para)
try:
self.doc.open(output)