Fix for bug when deleting birth and death events. Bug #2456

svn: r11191
This commit is contained in:
Gary Burton 2008-10-25 11:36:56 +00:00
parent 4fdec00c90
commit d682a1dcde

View File

@ -236,13 +236,13 @@ class Person(SourceBase, NoteBase, AttributeBase, MediaBase,
# If deleting removing the reference to the event # If deleting removing the reference to the event
# to which birth or death ref_index points, unset the index # to which birth or death ref_index points, unset the index
if (self.birth_ref_index != -1) \ if (self.birth_ref_index != -1) \
and (self.event_ref_list[self.birth_ref_index] and (self.event_ref_list[self.birth_ref_index].ref
in handle_list): in handle_list):
self.birth_ref_index = -1 self.set_birth_ref(None)
if (self.death_ref_index != -1) \ if (self.death_ref_index != -1) \
and (self.event_ref_list[self.death_ref_index] and (self.event_ref_list[self.death_ref_index].ref
in handle_list): in handle_list):
self.death_ref_index = -1 self.set_death_ref(None)
self.event_ref_list = new_list self.event_ref_list = new_list
# Reset the indexes after deleting the event from even_ref_list # Reset the indexes after deleting the event from even_ref_list