diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index ab7762aec..a81d741b6 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,8 @@ +2005-05-13 Martin Hawlisch + * src/SelectChild.py (on_save_child_clicked) Commit new parent family + of child properly; correct handle/object mismatch; exec parent callback + to do a proper redraw (closes #1201151) + 2005-05-12 Don Allingham * src/GrampsBSDDB.py: force database sync on transaction commit diff --git a/gramps2/src/SelectChild.py b/gramps2/src/SelectChild.py index db191c8a0..cdc3553c4 100644 --- a/gramps2/src/SelectChild.py +++ b/gramps2/src/SelectChild.py @@ -295,10 +295,12 @@ class SelectChild: self.family = RelLib.Family() self.db.add_family(self.family,trans) self.person.add_family_handle(self.family.get_handle()) + self.db.commit_person(self.person,trans) if self.person.get_gender() == RelLib.Person.MALE: - self.family.set_father_handle(self.person) + self.family.set_father_handle(self.person.get_handle()) else: - self.family.set_mother_handle(self.person) + self.family.set_mother_handle(self.person.get_handle()) + self.db.commit_family(self.family,trans) if handle in (self.family.get_father_handle(),self.family.get_mother_handle()): ErrorDialog(_("Error selecting a child"), @@ -328,6 +330,7 @@ class SelectChild: n = select_child.get_primary_name().get_regular_name() self.db.transaction_commit(trans,_("Add Child to Family (%s)") % n) self.close(obj) + self.callback() def on_show_toggled(self,obj): self.redraw_child_list(not obj.get_active()) @@ -378,4 +381,3 @@ class SelectChild: return ("","%sdóttir" % fname) else: return ("","") -