Fixed report problems and handling of the active spouse
svn: r62
This commit is contained in:
parent
5d4e64102f
commit
4e0a6483ff
@ -123,7 +123,7 @@ class PdfDoc(TextDoc):
|
|||||||
def end_paragraph(self):
|
def end_paragraph(self):
|
||||||
if self.in_table == 0 and self.image == 0:
|
if self.in_table == 0 and self.image == 0:
|
||||||
self.story.append(Paragraph(self.text,self.current_para))
|
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:
|
else:
|
||||||
self.image = 0
|
self.image = 0
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ class PdfDoc(TextDoc):
|
|||||||
colWidths=self.cur_table_cols,
|
colWidths=self.cur_table_cols,
|
||||||
style=ts)
|
style=ts)
|
||||||
self.story.append(tbl)
|
self.story.append(tbl)
|
||||||
self.story.append(Spacer(1,0.25*cm))
|
self.story.append(Spacer(1,0.5*cm))
|
||||||
self.in_table = 0
|
self.in_table = 0
|
||||||
|
|
||||||
def start_row(self):
|
def start_row(self):
|
||||||
@ -223,7 +223,7 @@ class PdfDoc(TextDoc):
|
|||||||
act_height = int(ny * scale)
|
act_height = int(ny * scale)
|
||||||
|
|
||||||
self.story.append(Image(name,act_width*0.5,act_height*0.5))
|
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
|
self.image = 1
|
||||||
|
|
||||||
def horizontal_line(self):
|
def horizontal_line(self):
|
||||||
|
@ -1442,8 +1442,6 @@ def on_filter_name_changed(obj):
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def on_spouselist_changed(obj):
|
def on_spouselist_changed(obj):
|
||||||
global active_spouse
|
|
||||||
|
|
||||||
if active_person == None :
|
if active_person == None :
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -1691,6 +1689,7 @@ def load_tree_values(person,index,max,pv_text,tip):
|
|||||||
def display_marriage(family):
|
def display_marriage(family):
|
||||||
global active_child
|
global active_child
|
||||||
global active_family
|
global active_family
|
||||||
|
global active_spouse
|
||||||
|
|
||||||
active_family = family
|
active_family = family
|
||||||
clist = Main.get_widget("child_list")
|
clist = Main.get_widget("child_list")
|
||||||
@ -1702,6 +1701,11 @@ def display_marriage(family):
|
|||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
if family != None:
|
if family != None:
|
||||||
|
if active_person.getGender() == Person.male:
|
||||||
|
active_spouse = family.getMother()
|
||||||
|
else:
|
||||||
|
active_spouse = family.getFather()
|
||||||
|
|
||||||
child_list = family.getChildList()
|
child_list = family.getChildList()
|
||||||
child_list.sort(sort.by_birthdate)
|
child_list.sort(sort.by_birthdate)
|
||||||
for child in child_list:
|
for child in child_list:
|
||||||
|
@ -114,6 +114,7 @@ class AncestorReport:
|
|||||||
para.set_header_level(1)
|
para.set_header_level(1)
|
||||||
para.set_top_border(0.2)
|
para.set_top_border(0.2)
|
||||||
para.set_bottom_border(0.2)
|
para.set_bottom_border(0.2)
|
||||||
|
para.set_padding(1)
|
||||||
self.doc.add_style("Title",para)
|
self.doc.add_style("Title",para)
|
||||||
|
|
||||||
font = FontStyle()
|
font = FontStyle()
|
||||||
@ -126,11 +127,13 @@ class AncestorReport:
|
|||||||
para.set_header_level(2)
|
para.set_header_level(2)
|
||||||
para.set_top_border(0.15)
|
para.set_top_border(0.15)
|
||||||
para.set_bottom_border(0.15)
|
para.set_bottom_border(0.15)
|
||||||
|
para.set_padding(1)
|
||||||
self.doc.add_style("Header",para)
|
self.doc.add_style("Header",para)
|
||||||
|
|
||||||
para = ParagraphStyle()
|
para = ParagraphStyle()
|
||||||
para.set_first_indent(-0.75)
|
para.set_first_indent(-0.75)
|
||||||
para.set_left_margin(1.0)
|
para.set_left_margin(1.0)
|
||||||
|
para.set_padding(1)
|
||||||
self.doc.add_style("ListEntry",para)
|
self.doc.add_style("ListEntry",para)
|
||||||
try:
|
try:
|
||||||
self.doc.open(output)
|
self.doc.open(output)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user