From 22691da9ccdc882dd9f91c122671c341915889f0 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 12 Aug 2001 03:52:39 +0000 Subject: [PATCH] Fixed delete person svn: r328 --- gramps/src/gramps_main.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/gramps/src/gramps_main.py b/gramps/src/gramps_main.py index 99256fcd9..1f452d604 100755 --- a/gramps/src/gramps_main.py +++ b/gramps/src/gramps_main.py @@ -1266,11 +1266,10 @@ def delete_person_response(val): if family: family.removeChild(active_person) + del personmap[active_person.getId()] remove_from_person_list(active_person) person_list.sort() update_display(0) - - del personmap[active_person.getId()] utils.modified() #------------------------------------------------------------------------- @@ -1281,14 +1280,12 @@ def delete_person_response(val): def remove_from_person_list(person): person_list.freeze() if id2col.has_key(person): - row = person_list.find_row_from_data(id2col[person]) - if row != -1: - person_list.remove(row) - if alt2col.has_key(person): - for id in alt2col[person]: + for id in [id2col[person]] + alt2col[person]: row = person_list.find_row_from_data(id) - if row != -1: - person_list.remove(row) + person_list.remove(row) + + del id2col[person] + del alt2col[person] person_list.thaw() #------------------------------------------------------------------------- @@ -2430,12 +2427,10 @@ def apply_filter(): else: if id2col.has_key(person): - id = id2col[person] + pid = id2col[person] del id2col[person] - row = person_list.find_row_from_data(id) - person_list.remove(row) - for id in alt2col[person]: + for id in [pid] + dalt2col[person]: row = person_list.find_row_from_data(id) person_list.remove(row)