From abcc1b8d386983f2de8780d722d2a8bb68e1a715 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 28 Mar 2002 14:57:40 +0000 Subject: [PATCH] Break shared note links after finished reading GEDCOM svn: r866 --- gramps/src/MergeData.py | 16 ++++++++++++++-- gramps/src/RelLib.py | 6 ++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/gramps/src/MergeData.py b/gramps/src/MergeData.py index 8d606858a..d4eb13f93 100644 --- a/gramps/src/MergeData.py +++ b/gramps/src/MergeData.py @@ -407,6 +407,18 @@ class MergePeople: # copy children from source to target + for child in src_family.getChildList(): + if child not in tgt_family.getChildList(): + tgt_family.addChild(child) + if child.getMainParents() == src_family: + child.setMainParents(tgt_family) + else: + index = 0 + for fam in child.getParentList()[:]: + if fam[0] == src_family: + child.getParentList()[index] = (tgt_family,fam[1],fam[2]) + index = index + 1 + # delete the old source family del self.db.getFamilyMap()[src_family.getId()] @@ -433,9 +445,9 @@ class MergePeople: child.setMainParents(tgt_family) else: index = 0 - for fam in child.getAltFamilies(): + for fam in child.getParentList()[:]: if fam[0] == src_family: - child.getAltFamilies()[index] = (tgt_family,fam[1],fam[2]) + child.getParentList()[index] = (tgt_family,fam[1],fam[2]) index = index + 1 # add family events from the old to the new diff --git a/gramps/src/RelLib.py b/gramps/src/RelLib.py index e90567a2c..e2c4dc3c1 100644 --- a/gramps/src/RelLib.py +++ b/gramps/src/RelLib.py @@ -88,6 +88,9 @@ class SourceNote: """Return in note instance, not just the text""" return self.note + def unique_note(self): + self.note = Note(self.note.get()) + class LdsOrd(SourceNote): """LDS Ordinance support""" def __init__(self,source=None): @@ -1143,6 +1146,9 @@ class Person: self.note = Note() return self.note + def unique_note(self): + self.note = Note(self.note.get()) + def setPosition(self,pos): """sets a graphical location pointer for graphic display (x,y)""" self.position = pos