diff --git a/gramps/plugins/view/geoclose.py b/gramps/plugins/view/geoclose.py index c68b92f2c..595e06409 100644 --- a/gramps/plugins/view/geoclose.py +++ b/gramps/plugins/view/geoclose.py @@ -210,12 +210,17 @@ class GeoClose(GeoGraphyView): self._createmap(p1, color, self.place_list_active, False) if self.refperson: color = self._config.get('geography.color1') - self.message_layer.add_message(_("Reference : %(name)s ( %(birth)s - %(death)s )") % {'name': _nd.display(self.refperson), - 'birth': self.birth(self.refperson), - 'death': self.death(self.refperson)}) - self.message_layer.add_message(_("The other : %(name)s ( %(birth)s - %(death)s )") % {'name': _nd.display(p1), - 'birth': self.birth(p1), - 'death': self.death(p1)}) + self.message_layer.add_message(_("Reference : %(name)s ( %(birth)s - %(death)s )") % { + 'name': _nd.display(self.refperson), + 'birth': self.birth(self.refperson), + 'death': self.death(self.refperson)}) + if p1: + self.message_layer.add_message(_("The other : %(name)s ( %(birth)s - %(death)s )") % { + 'name': _nd.display(p1), + 'birth': self.birth(p1), + 'death': self.death(p1)}) + else: + self.message_layer.add_message(_("The other person is unknown")) self._createmap(self.refperson, color, self.place_list_ref, True) else: self.message_layer.add_message(_("You must choose one reference person.")) @@ -295,7 +300,10 @@ class GeoClose(GeoGraphyView): active = self.get_active() person = self.dbstate.db.get_person_from_handle(active) self.lifeway_layer.clear_ways() - self.goto_handle(handle=person) + if person is None: + self.goto_handle(None) + else: + self.goto_handle(handle=person) def draw(self, menu, marks, color, reference): """ diff --git a/gramps/plugins/view/geofamclose.py b/gramps/plugins/view/geofamclose.py index a47de235b..b456102fc 100644 --- a/gramps/plugins/view/geofamclose.py +++ b/gramps/plugins/view/geofamclose.py @@ -241,7 +241,10 @@ class GeoFamClose(GeoGraphyView): color = self._config.get('geography.color1') self._createmap(self.reffamily, color, self.place_list_ref, True) self.message_layer.add_message(_("Family reference : %s" % self.family_label(self.reffamily))) - self.message_layer.add_message(_("The other family : %s" % self.family_label(f1))) + if f1: + self.message_layer.add_message(_("The other family : %s" % self.family_label(f1))) + else: + self.message_layer.add_message(_("The other family : %s" % _("Unknown"))) else: self.message_layer.add_message(_("You must choose one reference family.")) self.message_layer.add_message(_("Go to the family view and select "