2006-08-12 Don Allingham <don@gramps-project.org>
* src/Merge/_MergePerson.py: properly merge notes svn: r7163
This commit is contained in:
parent
cb1323f4f9
commit
cab2258c7a
@ -1,3 +1,6 @@
|
|||||||
|
2006-08-12 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/Merge/_MergePerson.py: properly merge notes
|
||||||
|
|
||||||
2006-08-12 Alex Roitman <shura@gramps-project.org>
|
2006-08-12 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/GrampsDb/_GrampsBSDDB.py: Fix new db creation; make metadata
|
* src/GrampsDb/_GrampsBSDDB.py: Fix new db creation; make metadata
|
||||||
work with UseTXN set either way.
|
work with UseTXN set either way.
|
||||||
|
@ -331,8 +331,13 @@ class MergePeople:
|
|||||||
self.p2 = person2
|
self.p2 = person2
|
||||||
|
|
||||||
def copy_note(self,one,two):
|
def copy_note(self,one,two):
|
||||||
if one.get_note() != two.get_note():
|
text1 = one.get_note()
|
||||||
one.set_note("%s\n\n%s" % (one.get_note(),two.get_note()))
|
text2 = two.get_note()
|
||||||
|
|
||||||
|
if text1 and text1 != text2:
|
||||||
|
one.set_note("%s\n\n%s" % (text1,text2))
|
||||||
|
else:
|
||||||
|
one.set_note(two.get_note())
|
||||||
|
|
||||||
def copy_sources(self,one,two):
|
def copy_sources(self,one,two):
|
||||||
slist = one.get_source_references()[:]
|
slist = one.get_source_references()[:]
|
||||||
@ -884,12 +889,14 @@ class MergePeople:
|
|||||||
print "Deleted empty family %s" % family_handle
|
print "Deleted empty family %s" % family_handle
|
||||||
|
|
||||||
def merge_notes(self, note1, note2):
|
def merge_notes(self, note1, note2):
|
||||||
if note1 and not note2:
|
t1 = note1.get()
|
||||||
|
t2 = note2.get()
|
||||||
|
if not t2:
|
||||||
return note1
|
return note1
|
||||||
elif not note1 and note2:
|
elif not t1:
|
||||||
return note2
|
return note2
|
||||||
elif note1 and note2:
|
elif t1 and t2:
|
||||||
note1.append("\n" + note2.get())
|
note1.append("\n" + t2)
|
||||||
note1.set_format(note1.get_format() or note2.get_format())
|
note1.set_format(note1.get_format() or note2.get_format())
|
||||||
return note1
|
return note1
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user