* src/AddSpouse.py: handle adding of new person callback correctly

svn: r1811
This commit is contained in:
Don Allingham 2003-07-03 03:32:46 +00:00
parent a71bfc9254
commit 11b177bd64

View File

@ -145,12 +145,18 @@ class AddSpouse:
person.setGender(gen) person.setGender(gen)
EditPerson.EditPerson(person,self.db,self.update_list) EditPerson.EditPerson(person,self.db,self.update_list)
def update_list(self,person): def update_list(self,epo,list):
""" """
Updates the potential spouse list after a person has been added Updates the potential spouse list after a person has been added
to database. Called by the QuickAdd class when the dialog has to database. Called by the QuickAdd class when the dialog has
been closed. been closed.
""" """
person = epo.person
if person.getId() == "":
self.db.addPerson(person)
else:
self.db.addPersonNoMap(person,person.getId())
self.db.buildPersonDisplay(person.getId())
self.addperson(person) self.addperson(person)
self.update_data(person.getId()) self.update_data(person.getId())
self.slist.center_selected() self.slist.center_selected()