fixed adding child to wrong family

svn: r4439
This commit is contained in:
Don Allingham 2005-04-28 19:03:33 +00:00
parent 941d616ca0
commit f187d9f103
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,6 @@
2005-04-28 <don@gramps-project.org>
* src/FamilyView.py: fix adding child to wrong family
2005-04-27 Martin Hawlisch <Martin.Hawlisch@gmx.de> 2005-04-27 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/gramps_main.py (__init__): Avoid TypeError in schema error * src/gramps_main.py (__init__): Avoid TypeError in schema error
message message

View File

@ -110,7 +110,7 @@ class FamilyView:
db.connect('person-rebuild', self.load_family) db.connect('person-rebuild', self.load_family)
def update_callback(self,handle): def update_callback(self,handle):
self.load_family() self.load_family(self.family)
def set_widgets(self,val): def set_widgets(self,val):
already_init = self.cadded[val] already_init = self.cadded[val]
@ -584,11 +584,13 @@ class FamilyView:
model, node = obj.get_selected() model, node = obj.get_selected()
if not node: if not node:
self.display_marriage(None) self.display_marriage(None)
self.family = None
else: else:
row = model.get_path(node) row = model.get_path(node)
family_handle = self.person.get_family_handle_list()[row[0]] family_handle = self.person.get_family_handle_list()[row[0]]
fam = self.parent.db.get_family_from_handle(family_handle) fam = self.parent.db.get_family_from_handle(family_handle)
self.display_marriage(fam) self.display_marriage(fam)
self.family = fam
def build_spouse_menu(self,event): def build_spouse_menu(self,event):
@ -796,7 +798,7 @@ class FamilyView:
self.parent.db.commit_person(new_person,trans) self.parent.db.commit_person(new_person,trans)
self.parent.db.commit_family(family,trans) self.parent.db.commit_family(family,trans)
self.parent.db.transaction_commit(trans,_("Add Child to Family")) self.parent.db.transaction_commit(trans,_("Add Child to Family"))
self.display_marriage(family) self.load_family(family)
def select_child_clicked(self,obj): def select_child_clicked(self,obj):
if not self.person: if not self.person: