Skip to content

Commit 323da69

Browse files
SNoiraudsam-m888
authored andcommitted
[GraphView]does not show all descendants (#196)[gramps50]
Fixes #11088
1 parent 20eadd0 commit 323da69

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

GraphView/graphview.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2325,8 +2325,18 @@ def add_descendant(self, person, num_generations, person_handles):
23252325
if num_generations < 0:
23262326
return
23272327

2328-
# add self
2329-
if person.handle not in person_handles:
2328+
# look at if we have children
2329+
nb_child = 0
2330+
for family_handle in person.get_family_handle_list():
2331+
family = self.database.get_family_from_handle(family_handle)
2332+
for child_ref in family.get_child_ref_list():
2333+
# we have at least one child. stop
2334+
nb_child += 1
2335+
break
2336+
break
2337+
2338+
# add self if not already processed or if we have children
2339+
if person.handle not in person_handles or nb_child != 0:
23302340
person_handles.append(person.handle)
23312341

23322342
for family_handle in person.get_family_handle_list():

0 commit comments

Comments
 (0)