From 2aaebe3254171220075d1ac2ca2e9e1a4f356181 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 30 Sep 2003 03:31:14 +0000 Subject: [PATCH] * src/gramps_main.py: fixed delete person problem. svn: r2185 --- src/gramps_main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gramps_main.py b/src/gramps_main.py index 1342ce01f..c64922562 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -1577,6 +1577,8 @@ class Gramps: def delete_person_response(self): for family in self.active_person.getFamilyList(): + if not family: + continue if self.active_person == family.getFather(): if family.getMother() == None: for child in family.getChildList(): @@ -1599,6 +1601,12 @@ class Gramps: self.db.removePerson(self.active_person.getId()) self.remove_from_person_list(self.active_person) self.person_model.sort_column_changed() + try: + self.mhistory = self.mhistory[:-2] + self.change_active_person(self.mhistory[-2]) + except: + self.mhistory = [] + self.change_active_person(None) self.update_display(0) Utils.modified()