Fixed removal of child

svn: r1293
This commit is contained in:
Don Allingham 2003-02-09 03:13:04 +00:00
parent a78ab76040
commit 9f42e1fd22
4 changed files with 14 additions and 11 deletions

View File

@ -323,7 +323,10 @@ class NewChild:
msn = mother.getPrimaryName().getSurname()
if not father or not mother:
return ""
return "%s %s" % (string.split(fsn)[0],string.split(msn)[0])
try:
return "%s %s" % (string.split(fsn)[0],string.split(msn)[0])
except:
return ""
else:
return ""

View File

@ -448,7 +448,7 @@ class Gramps:
return
self.active_family.removeChild(self.active_child)
self.active_child.removeAltFamily(self.active_child)
self.active_child.removeAltFamily(self.active_family)
if len(self.active_family.getChildList()) == 0:
if self.active_family.getFather() == None:

View File

@ -232,7 +232,7 @@ class Merge:
(p1,p2) = self.mlist.get_row_data(row)
MergeData.MergePeople(self.db,p1,p2,self.on_update)
def on_update(self,p1,p2):
def on_update(self,p1,p2,old_id):
self.dellist[p2] = p1
for key in self.dellist.keys():
if self.dellist[key] == p2:

View File

@ -698,15 +698,15 @@ class GedcomWriter:
self.g.write("1 RESI\n")
self.print_date("2 DATE",addr.getDateObj())
if self.resi == 0:
self.write_long_text("ADDR",2,addr.getStreet())
self.write_long_text("ADDR",2,self.cnvtxt(addr.getStreet()))
if addr.getCity() != "":
self.g.write("3 CITY %s\n" % addr.getCity())
self.g.write("3 CITY %s\n" % self.cnvtxt(addr.getCity()))
if addr.getState() != "":
self.g.write("3 STAE %s\n" % addr.getState())
self.g.write("3 STAE %s\n" % self.cnvtxt(addr.getState()))
if addr.getPostal() != "":
self.g.write("3 POST %s\n" % addr.getPostal())
self.g.write("3 POST %s\n" % self.cnvtxt(addr.getPostal()))
if addr.getCountry() != "":
self.g.write("3 CTRY %s\n" % addr.getCountry())
self.g.write("3 CTRY %s\n" % self.cnvtxt(addr.getCountry()))
else:
text = addr.getStreet()
text = addr_append(text,addr.getCity())
@ -928,7 +928,7 @@ class GedcomWriter:
if ref_text != "" or not ref.getDate().isEmpty():
self.g.write('%d DATA\n' % (level+1))
if ref_text != "":
self.write_long_text("TEXT",level+2,ref_text)
self.write_long_text("TEXT",level+2,self.cnvtxt(ref_text))
pfx = "%d DATE" % (level+2)
self.print_date(pfx,ref.getDate())
else:
@ -949,9 +949,9 @@ class GedcomWriter:
else:
self.g.write("\n")
if ref.getText():
self.write_long_text("TEXT",level+1,ref_text)
self.write_long_text("TEXT",level+1,self.cnvtxt(ref_text))
if ref.getComments() != "":
self.write_long_text("NOTE",level+1,ref.getComments())
self.write_long_text("NOTE",level+1,self.cnvtxt(ref.getComments()))
def fid(self,id):
return id