From b77ef0058ac2c4843eea87ff942c94fa65b0ec89 Mon Sep 17 00:00:00 2001 From: Vassilii Khachaturov Date: Tue, 16 Jul 2013 16:56:11 +0000 Subject: [PATCH] 6915: not related tool treats siblings as not rel. Applying patch from ennoborg, thanks! Tested manually, according to the procedure in the bug. svn: r22689 --- src/plugins/tool/NotRelated.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/plugins/tool/NotRelated.py b/src/plugins/tool/NotRelated.py index 79e5e6d2f..8fb44ace1 100644 --- a/src/plugins/tool/NotRelated.py +++ b/src/plugins/tool/NotRelated.py @@ -328,7 +328,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow.ManagedWindow) : # remember that we've now seen this person self.handlesOfPeopleAlreadyProcessed.add(handle) - # we have 3 things to do: find (1) spouses, (2) parents, and (3) children + # we have 4 things to do: find (1) spouses, (2) parents, siblings(3), and (4) children # step 1 -- spouses for familyHandle in person.get_family_handle_list(): @@ -350,7 +350,16 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow.ManagedWindow) : motherHandle not in self.handlesOfPeopleAlreadyProcessed: self.handlesOfPeopleToBeProcessed.add(motherHandle) - # step 3 -- children + # step 3 -- siblings + for familyHandle in person.get_parent_family_handle_list(): + family = self.db.get_family_from_handle(familyHandle) + for childRef in family.get_child_ref_list(): + childHandle = childRef.ref + if childHandle and \ + childHandle not in self.handlesOfPeopleAlreadyProcessed: + self.handlesOfPeopleToBeProcessed.add(childHandle) + + # step 4 -- children for familyHandle in person.get_family_handle_list(): family = self.db.get_family_from_handle(familyHandle) for childRef in family.get_child_ref_list():