Adding new child does not add duplicate to person list
svn: r980
This commit is contained in:
parent
358f09ca08
commit
f94c19ffee
@ -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)
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user