* src/GrampsDb/_WriteXML.py: fix bookmark handling

* src/plugins/FindDupes.py (Merge.find_potentials): update internal
	list on call (bug# 789)
	copy the LDS information (bug# 642)
	(MergePeople.merge_existing_family): fix child references on merge
	


svn: r7838
This commit is contained in:
Don Allingham 2006-12-22 23:28:05 +00:00
parent bfe7478d99
commit 1b35b73038
2 changed files with 15 additions and 4 deletions

View File

@ -1,7 +1,10 @@
2006-12-22 Don Allingham <don@gramps-project.org> 2006-12-22 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_WriteXML.py: fix bookmark handling
* src/plugins/FindDupes.py (Merge.find_potentials): update internal
list on call (bug# 789)
* src/Merge/_MergePerson.py (MergePeople.merge_person_information): * src/Merge/_MergePerson.py (MergePeople.merge_person_information):
copy the LDS information copy the LDS information (bug# 642)
(MergePeople.merge_existing_family): fix child references on merge
2006-12-21 Don Allingham <don@gramps-project.org> 2006-12-21 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_GrampsXMLDB.py: fix bookmarks * src/GrampsDb/_GrampsXMLDB.py: fix bookmarks

View File

@ -357,7 +357,7 @@ class MergePeople:
slist = one.get_source_references()[:] slist = one.get_source_references()[:]
for xsrc in two.get_source_references(): for xsrc in two.get_source_references():
for src in slist: for src in slist:
if src.are_equal(xsrc): if src.is_equal(xsrc):
break break
else: else:
one.add_source_reference(xsrc) one.add_source_reference(xsrc)
@ -621,6 +621,9 @@ class MergePeople:
Merges the relationships associated with the merged people. Merges the relationships associated with the merged people.
""" """
if __debug__:
print "********Merging Relationships********"
family_num = 0 family_num = 0
family_list = self.p1.get_family_handle_list() family_list = self.p1.get_family_handle_list()
new.set_family_handle_list(family_list) new.set_family_handle_list(family_list)
@ -640,12 +643,16 @@ class MergePeople:
# The target family is already a family in the person's # The target family is already a family in the person's
# family list. # family list.
if tgt_family.get_handle() in self.p1.get_family_handle_list(): if tgt_family.get_handle() in self.p1.get_family_handle_list():
if __debug__:
print "Merging existing family"
self.merge_existing_family(new, src_family, tgt_family, trans) self.merge_existing_family(new, src_family, tgt_family, trans)
continue continue
# This is the case the family is not already in the person's # This is the case the family is not already in the person's
# family list. # family list.
else: else:
if __debug__:
print "Merging family pair"
self.merge_family_pair(tgt_family,src_family,trans) self.merge_family_pair(tgt_family,src_family,trans)
# change parents of the family to point to the new # change parents of the family to point to the new
@ -780,6 +787,7 @@ class MergePeople:
if __debug__: if __debug__:
print "Remove parent family %s from %s" \ print "Remove parent family %s from %s" \
% (src_family_handle,child_handle) % (src_family_handle,child_handle)
child.add_parent_family_handle(tgt_family.handle)
self.db.commit_person(child,trans) self.db.commit_person(child,trans)
# delete the old source family # delete the old source family