diff --git a/gramps2/src/AddSpouse.py b/gramps2/src/AddSpouse.py index 7e588ea1c..09c8f9adf 100644 --- a/gramps2/src/AddSpouse.py +++ b/gramps2/src/AddSpouse.py @@ -128,20 +128,22 @@ class AddSpouse: Called when the spouse to be added does not exist, and needs to be created and added to the database """ - import QuickAdd + import EditPerson relation = const.save_frel(self.relation_type.get_text()) if relation == "Partners": if self.person.getGender() == RelLib.Person.male: - gen = "male" + gen = RelLib.Person.male else: - gen = "female" + gen = RelLib.Person.female elif self.person.getGender() == RelLib.Person.male: - gen = "female" + gen = RelLib.Person.female else: - gen = "male" + gen = RelLib.Person.male - QuickAdd.QuickAdd(self.db,gen,self.update_list) + person = RelLib.Person() + person.setGender(gen) + EditPerson.EditPerson(person,self.db,self.update_list) def update_list(self,person): """ diff --git a/gramps2/src/EditPerson.py b/gramps2/src/EditPerson.py index 243e34d51..b3607eb04 100644 --- a/gramps2/src/EditPerson.py +++ b/gramps2/src/EditPerson.py @@ -72,7 +72,7 @@ pycode_tgts = [('url', 0, 0), #------------------------------------------------------------------------- class EditPerson: - def __init__(self,person,db,callback=None): + def __init__(self,person,db,callback=None,gender=RelLib.Person.female): """Creates an edit window. Associates a person with the window.""" self.person = person self.original_id = person.getId() @@ -985,7 +985,6 @@ class EditPerson: self.redraw_event_list() def update_birth_death(self): - print "update" self.bdate.set_text(self.birth.getDate()) self.bplace.set_text(self.birth.getPlaceName()) self.bdate_check.set_calendar(self.birth.getDateObj().get_calendar())