diff --git a/gramps/plugins/drawreport/descendtree.py b/gramps/plugins/drawreport/descendtree.py index 67ec31d1d..3ae01d026 100644 --- a/gramps/plugins/drawreport/descendtree.py +++ b/gramps/plugins/drawreport/descendtree.py @@ -210,7 +210,9 @@ class TitleNone(TitleNoDisplay): def calc_title(self, persons): """Calculate the title of the report""" - self.text = 'Descendant Graph' + #we want no text, but need a text for the TOC in a book! + self.mark_text = 'Descendant Graph' + self.text = '' class TitleDPY(DescendantTitleBase): """Descendant (Person yes start with parents) Chart diff --git a/gramps/plugins/lib/libtreebase.py b/gramps/plugins/lib/libtreebase.py index 833ca6372..0229d97da 100644 --- a/gramps/plugins/lib/libtreebase.py +++ b/gramps/plugins/lib/libtreebase.py @@ -636,6 +636,8 @@ class TitleNoDisplay(BoxBase): BoxBase.__init__(self) self.doc = doc self.boxstr = boxstr + #if text in TOC needs to be different from text, set mark_text + self.mark_text = None def set_box_height_width(self): self.width = self.height = 0 @@ -643,10 +645,11 @@ class TitleNoDisplay(BoxBase): def display(self): """ display the title box. """ #Set up the Table of Contents here - from gramps.gen.plug.docgen import (IndexMark, INDEX_TYPE_TOC) # interim, here - mark = IndexMark(self.text, INDEX_TYPE_TOC, 1) - + if self.mark_text is None: + mark = IndexMark(self.text, INDEX_TYPE_TOC, 1) + else: + mark = IndexMark(self.mark_text, INDEX_TYPE_TOC, 1) self.doc.center_text(self.boxstr, '', 0, -100, mark) class TitleBox(BoxBase):