From 022ba94cd7e9cccb440062fc472022c507503460 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Tue, 7 Feb 2017 09:29:23 -0800 Subject: [PATCH] 9004: Error printing graphical report ancestor tree --- gramps/plugins/drawreport/ancestortree.py | 8 ++++++-- gramps/plugins/lib/librecurse.py | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gramps/plugins/drawreport/ancestortree.py b/gramps/plugins/drawreport/ancestortree.py index 46bd3ac22..f75bc3a86 100644 --- a/gramps/plugins/drawreport/ancestortree.py +++ b/gramps/plugins/drawreport/ancestortree.py @@ -144,6 +144,7 @@ class CalcItems: """ def __init__(self, dbase): _gui = GUIConnect() + self._gui = _gui #calculate the printed lines for each box #str = "" @@ -172,12 +173,14 @@ class CalcItems: working_lines = "" if index[1] % 2 == 0 or (index[1] == 1 and self.center_use == 0): if indi_handle == fams_handle == None: - working_lines = self.__blank_father + working_lines = self.__calc_l.calc_lines( + None, None, self._gui.get_val("father_disp")) else: working_lines = self.disp_father else: if indi_handle == fams_handle == None: - working_lines = self.__blank_mother + working_lines = self.__calc_l.calc_lines( + None, None, self._gui.get_val("mother_disp")) else: working_lines = self.disp_mother @@ -230,6 +233,7 @@ class MakeAncestorTree(AscendPerson): myself.text = self.calc_items.calc_person(index, indi_handle, fams_handle) + # myself.text[0] = myself.text[0] + ' ' + repr(index) # for debugging if indi_handle is not None: # None is legal for an empty box myself.add_mark(self.database, diff --git a/gramps/plugins/lib/librecurse.py b/gramps/plugins/lib/librecurse.py index a9a2416c3..fa161f9cd 100644 --- a/gramps/plugins/lib/librecurse.py +++ b/gramps/plugins/lib/librecurse.py @@ -446,13 +446,13 @@ class AscendPerson(_StopRecurse, _PersonSeen): # Recursively call the function. It is okay if the handle is None, # since routine handles a handle of None - self.__fill(index*2, generation+1, mx_fill-1) + self.__fill(generation+1, index*2, mx_fill-1) if mx_fill > 1: # marriage of parents self.add_marriage((generation+1, index*2), None, None) if not self.can_recurse(): self.continue_recursion() return - self.__fill((index*2)+1, generation+1, mx_fill-1) + self.__fill(generation+1, (index*2)+1, mx_fill-1) def __iterate(self, generation, index, person_handle, full_family_handle): """