From f94c19ffee082ceff1841983399a3d0f7fc4ad3c Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 9 May 2002 02:09:33 +0000 Subject: [PATCH] Adding new child does not add duplicate to person list svn: r980 --- gramps/src/SelectChild.py | 11 +++-------- gramps/src/gramps_main.py | 1 + 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/gramps/src/SelectChild.py b/gramps/src/SelectChild.py index adfbe92ab..7e41800f8 100644 --- a/gramps/src/SelectChild.py +++ b/gramps/src/SelectChild.py @@ -212,11 +212,12 @@ class SelectChild: 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.person = person self.family = family self.update = update + self.edit_update = update_disp self.xml = libglade.GladeXML(const.gladeFile,"addChild") self.xml.signal_autoconnect({ @@ -373,9 +374,6 @@ class NewChild: mrel = const.childRelations[self.mrel.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) self.family.addChild(person) @@ -387,13 +385,10 @@ class NewChild: Utils.destroy_passed_object(obj) self.new_child = person - def other_update(self,arg1,plist): - self.update(None,self.new_child,plist) - def on_edit_new_child(self,obj): import EditPerson 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) diff --git a/gramps/src/gramps_main.py b/gramps/src/gramps_main.py index 3b725d1ed..5a420fb37 100755 --- a/gramps/src/gramps_main.py +++ b/gramps/src/gramps_main.py @@ -577,6 +577,7 @@ class Gramps: if self.active_person: SelectChild.NewChild(self.database,self.active_family, self.active_person,self.update_after_newchild, + self.update_after_edit, GrampsCfg.lastnamegen) def on_choose_parents_clicked(self,obj):