diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index f924b19f0..8c646e515 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2006-04-30 Brian Matherly + * src/plugins/CountAncestors.py: Use positive numbers for generations to be + consistent with the rest of GRAMPS + 2006-04-30 Don Allingham * src/RelLib/_Person.py: prevent duplicate entries in family lists diff --git a/gramps2/src/plugins/CountAncestors.py b/gramps2/src/plugins/CountAncestors.py index ac913e817..d575ef716 100644 --- a/gramps2/src/plugins/CountAncestors.py +++ b/gramps2/src/plugins/CountAncestors.py @@ -72,13 +72,13 @@ class CountAncestors: title = _("Number of ancestors of \"%s\" by generation") % person.get_primary_name().get_name() text += title + ':\n' thisgensize = 1 - gen = 1 + gen = 0 while thisgensize > 0: thisgensize = 0 if thisgen: thisgensize = len( thisgen ) - gen -= 1 - theoretical = pow(2, ( gen * -1 ) ) + gen += 1 + theoretical = pow(2, ( gen - 1 ) ) total_theoretical += theoretical percent = ( thisgensize / theoretical ) * 100 if thisgensize == 1 : @@ -107,7 +107,7 @@ class CountAncestors: else: percent = 0 - text += _("Total ancestors in generations %d to -1 is %d. (%3.2f%%)\n") % (gen,allgen,percent) + text += _("Total ancestors in generations 2 to %d is %d. (%3.2f%%)\n") % (gen,allgen,percent) top = topDialog.get_widget("summary") textwindow = topDialog.get_widget("textwindow")