Skip to content

Commit bb1a5d9

Browse files
committed
Fix TimeLinePedigreeView for long marriage lines with no marr. date
Fixes #10988
1 parent 009f4a1 commit bb1a5d9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

TimelinePedigreeView/TimelinePedigreeView.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,10 @@ def Tree_MoveBranchBoxes(self, layout_widget, BranchData, BoxRight, BranchTop, D
711711
if marriagedate:
712712
mDate = marriagedate.get_date_object()
713713
bDate = self.Tree_EstimateBirth(BranchData[0])
714-
if bDate is not None and mDate is not None:
715-
timespan = bDate.to_calendar("gregorian").get_year() - mDate.to_calendar("gregorian").get_year()
714+
if(bDate is not None and not bDate.is_empty() and
715+
mDate is not None and not mDate.is_empty()):
716+
timespan = (bDate.to_calendar("gregorian").get_year() -
717+
mDate.to_calendar("gregorian").get_year())
716718
xvline = xBoxConnection - Direction * 11 * timespan
717719

718720
# Move all relatives in this branch
@@ -740,7 +742,7 @@ def Tree_MoveBranchBoxes(self, layout_widget, BranchData, BoxRight, BranchTop, D
740742
family = self.dbstate.db.get_family_from_handle(family_handle)
741743
if family:
742744
text = self.format_helper.format_relation( family, BoxSizes[4])
743-
label = Gtk.Label(label=text)
745+
label = Gtk.Label(label=text, tooltip_text=text)
744746
label.set_justify(Gtk.Justification.LEFT)
745747
label.set_line_wrap(True)
746748
label.set_alignment(0.1,0.5)

0 commit comments

Comments
 (0)