* src/PeopleView.py: handle changing of surnames if the surname

needs to be removed from the list


svn: r3636
This commit is contained in:
Don Allingham 2004-10-16 21:03:38 +00:00
parent e474fa97b9
commit 3984b9b056
3 changed files with 11 additions and 4 deletions

View File

@ -4,6 +4,8 @@
* src/gedcomimport.glade: allow default when selecting override * src/gedcomimport.glade: allow default when selecting override
* src/gramps_main.py: don't lose track of active person after * src/gramps_main.py: don't lose track of active person after
a cancelled Add Person a cancelled Add Person
* src/PeopleView.py: handle changing of surnames if the surname
needs to be removed from the list
2004-10-15 Don Allingham <dallingham@users.sourceforge.net> 2004-10-15 Don Allingham <dallingham@users.sourceforge.net>
* src/GrampsBSDDB.py: increase cachesize * src/GrampsBSDDB.py: increase cachesize

View File

@ -274,9 +274,12 @@ class PeopleView:
def delete_person(self,person): def delete_person(self,person):
node = person.get_handle() node = person.get_handle()
top = person.get_primary_name().get_group_name() top = person.get_primary_name().get_group_name()
if len(self.person_model.sname_sub[top]) == 1: try:
path = self.person_model.on_get_path(top) if len(self.person_model.sname_sub[top]) == 1:
self.person_model.row_deleted(path) path = self.person_model.on_get_path(top)
self.person_model.row_deleted(path)
except:
pass
path = self.person_model.on_get_path(node) path = self.person_model.on_get_path(node)
self.person_model.row_deleted(path) self.person_model.row_deleted(path)

View File

@ -1439,7 +1439,9 @@ class Gramps:
def update_after_edit(self,epo,change=1): def update_after_edit(self,epo,change=1):
self.active_person = epo.person self.active_person = epo.person
if change: if epo.orig_surname != self.active_person.get_primary_name().get_surname():
self.people_view.build_tree()
elif change:
self.people_view.update_person_list(epo.person) self.people_view.update_person_list(epo.person)
else: else:
self.people_view.redisplay_person_list(epo.person) self.people_view.redisplay_person_list(epo.person)