* src/MergePeople.py (merge_family_pair): Properly use handles.

svn: r4630
This commit is contained in:
Alex Roitman
2005-05-19 15:33:49 +00:00
parent 684b7725c6
commit 2f6c93d5d9
2 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,6 @@
2005-05-19 Alex Roitman <shura@gramps-project.org>
* src/MergePeople.py (merge_family_pair): Properly use handles.
2005-05-19 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/GenericFilter.py: Catch invalid input in some filters;
(old_names_2_class): Add one name for full 1.0.11 compatibility;

View File

@ -391,13 +391,13 @@ class MergePeople:
if child_handle not in tgt_family.get_child_handle_list():
child = self.db.get_person_from_handle(child_handle)
parents = child.get_parent_family_handle_list()
tgt_family.add_child_handle(child)
if child.get_main_parents_family_handle() == src_family:
child.set_main_parent_family_handle(tgt_family)
tgt_family.add_child_handle(child_handle)
if child.get_main_parents_family_handle() == src_family.get_handle():
child.set_main_parent_family_handle(tgt_family.get_handle())
i = 0
for fam in parents[:]:
if fam[0] == src_family.get_handle():
parents[i] = (tgt_family,fam[1],fam[2])
parents[i] = (tgt_family.get_handle(),fam[1],fam[2])
i += 1
self.db.commit_person(child,trans)