Adding new child does not add duplicate to person list

svn: r980
This commit is contained in:
Don Allingham 2002-05-09 02:09:33 +00:00
parent 358f09ca08
commit f94c19ffee
2 changed files with 4 additions and 8 deletions

View File

@ -212,11 +212,12 @@ class SelectChild:
class NewChild: class NewChild:
def __init__(self,db,family,person,update,autoname=3): def __init__(self,db,family,person,update,update_disp,autoname=3):
self.db = db self.db = db
self.person = person self.person = person
self.family = family self.family = family
self.update = update self.update = update
self.edit_update = update_disp
self.xml = libglade.GladeXML(const.gladeFile,"addChild") self.xml = libglade.GladeXML(const.gladeFile,"addChild")
self.xml.signal_autoconnect({ self.xml.signal_autoconnect({
@ -373,9 +374,6 @@ class NewChild:
mrel = const.childRelations[self.mrel.get_text()] mrel = const.childRelations[self.mrel.get_text()]
frel = const.childRelations[self.frel.get_text()] frel = const.childRelations[self.frel.get_text()]
# if mrel == "Birth" and frel == "Birth":
# person.setMainFamily(self.family)
# else:
person.addAltFamily(self.family,mrel,frel) person.addAltFamily(self.family,mrel,frel)
self.family.addChild(person) self.family.addChild(person)
@ -387,13 +385,10 @@ class NewChild:
Utils.destroy_passed_object(obj) Utils.destroy_passed_object(obj)
self.new_child = person self.new_child = person
def other_update(self,arg1,plist):
self.update(None,self.new_child,plist)
def on_edit_new_child(self,obj): def on_edit_new_child(self,obj):
import EditPerson import EditPerson
self.on_addchild_ok_clicked(obj) self.on_addchild_ok_clicked(obj)
EditPerson.EditPerson(self.new_child,self.db,self.other_update) EditPerson.EditPerson(self.new_child,self.db,self.edit_update)

View File

@ -577,6 +577,7 @@ class Gramps:
if self.active_person: if self.active_person:
SelectChild.NewChild(self.database,self.active_family, SelectChild.NewChild(self.database,self.active_family,
self.active_person,self.update_after_newchild, self.active_person,self.update_after_newchild,
self.update_after_edit,
GrampsCfg.lastnamegen) GrampsCfg.lastnamegen)
def on_choose_parents_clicked(self,obj): def on_choose_parents_clicked(self,obj):