fixes for error:

http://www.gramps-project.org/bugs/view.php?id=4751

Too much work was done inside of __init__.  Moved it out.


svn: r16842
This commit is contained in:
Craig J. Anderson 2011-03-17 16:28:18 +00:00
parent ae2eb8eba5
commit 1c8384ff20
2 changed files with 9 additions and 6 deletions

View File

@ -671,10 +671,9 @@ class AncestorTree2(Report):
"""
Report.__init__(self, database, options_class)
self.database = database
self.connect = GUIConnect()
self.connect.set__opts(options_class.menu)
self.options_class = options_class
self.database = database
#The canvas that we will put our report on and print off of
self.canvas = Canvas(self.doc)
@ -700,6 +699,9 @@ class AncestorTree2(Report):
database = self.database
self.connect = GUIConnect()
self.connect.set__opts(self.options_class.menu)
#Set up the canvas that we will print on.
style_sheet = self.doc.get_style_sheet()
font_normal = style_sheet.get_paragraph_style("AC2-Normal").get_font()

View File

@ -1270,11 +1270,9 @@ class Descend2Tree(Report):
"""
Report.__init__(self, database, options_class)
self.options_class = options_class
self.database = database
self.Connect = GuiConnect()
self.Connect.set__opts(options_class.menu, options_class.name)
#The canvas that we will put our report on and print off of
self.canvas = Canvas(self.doc)
@ -1285,6 +1283,9 @@ class Descend2Tree(Report):
database = self.database
self.Connect = GuiConnect()
self.Connect.set__opts(self.options_class.menu, self.options_class.name)
style_sheet = self.doc.get_style_sheet()
font_normal = style_sheet.get_paragraph_style("CG2-Normal").get_font()
self.doc.report_opts = ReportOptions(self.doc, font_normal, "CG2-line")