9004: Error printing graphical report ancestor tree

This commit is contained in:
Paul Franklin 2017-02-07 09:29:23 -08:00
parent 42ed11e0ff
commit 022ba94cd7
2 changed files with 8 additions and 4 deletions

View File

@ -144,6 +144,7 @@ class CalcItems:
""" """
def __init__(self, dbase): def __init__(self, dbase):
_gui = GUIConnect() _gui = GUIConnect()
self._gui = _gui
#calculate the printed lines for each box #calculate the printed lines for each box
#str = "" #str = ""
@ -172,12 +173,14 @@ class CalcItems:
working_lines = "" working_lines = ""
if index[1] % 2 == 0 or (index[1] == 1 and self.center_use == 0): if index[1] % 2 == 0 or (index[1] == 1 and self.center_use == 0):
if indi_handle == fams_handle == None: 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: else:
working_lines = self.disp_father working_lines = self.disp_father
else: else:
if indi_handle == fams_handle == None: 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: else:
working_lines = self.disp_mother working_lines = self.disp_mother
@ -230,6 +233,7 @@ class MakeAncestorTree(AscendPerson):
myself.text = self.calc_items.calc_person(index, myself.text = self.calc_items.calc_person(index,
indi_handle, fams_handle) 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 if indi_handle is not None: # None is legal for an empty box
myself.add_mark(self.database, myself.add_mark(self.database,

View File

@ -446,13 +446,13 @@ class AscendPerson(_StopRecurse, _PersonSeen):
# Recursively call the function. It is okay if the handle is None, # Recursively call the function. It is okay if the handle is None,
# since routine handles a handle of 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 if mx_fill > 1: # marriage of parents
self.add_marriage((generation+1, index*2), None, None) self.add_marriage((generation+1, index*2), None, None)
if not self.can_recurse(): if not self.can_recurse():
self.continue_recursion() self.continue_recursion()
return 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): def __iterate(self, generation, index, person_handle, full_family_handle):
""" """