diff --git a/gramps2/src/Makefile.am b/gramps2/src/Makefile.am index e1ac9cb7d..d79740862 100644 --- a/gramps2/src/Makefile.am +++ b/gramps2/src/Makefile.am @@ -132,7 +132,7 @@ GRAPHICS = \ tools.png # Other stuff that we need to install -dist_pkgdata_DATA = $(GLADEFILES) $(GRAPHICS) gramps.desktop +dist_pkgdata_DATA = $(GLADEFILES) $(GRAPHICS) gramps.desktop papersize.xml EXTRA_DIST = grampslib.i grampslib_wrap.c diff --git a/gramps2/src/RelLib.py b/gramps2/src/RelLib.py index 891650ada..51aa2d27d 100644 --- a/gramps2/src/RelLib.py +++ b/gramps2/src/RelLib.py @@ -2336,7 +2336,8 @@ class GrampsDB: if (self.default): self.default.setAncestor(0) self.default = person - self.default.setAncestor(1) + if person: + self.default.setAncestor(1) def getDefaultPerson(self): """returns the default Person of the database""" diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index ea675a756..e127f23aa 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -1283,6 +1283,10 @@ class Gramps: self.update_display(0) def delete_person_response(self): + + if self.db.getDefaultPerson() == self.active_person: + self.db.setDefaultPerson(None) + for family in self.active_person.getFamilyList(): if not family: continue @@ -1301,9 +1305,9 @@ class Gramps: else: family.setMother(None) - family = self.active_person.getMainParents() - if family: - family.removeChild(self.active_person) + for (family,mrel,frel) in self.active_person.getParentList(): + if family: + family.removeChild(self.active_person) self.people_view.remove_from_history(self.active_person) self.db.removePerson(self.active_person.getId()) @@ -1315,6 +1319,7 @@ class Gramps: else: self.change_active_person(None) self.redraw_histmenu() + Utils.modified() def merge_update(self,p1,p2,old_id):