diff --git a/gramps2/src/FamilyView.py b/gramps2/src/FamilyView.py index ef4806c7c..711d8b21d 100644 --- a/gramps2/src/FamilyView.py +++ b/gramps2/src/FamilyView.py @@ -282,11 +282,18 @@ class FamilyView: person = family.getMother() self.parent.change_active_person(person) self.load_family(family) - + + def clear(self): + self.spouse_model.clear() + self.child_model.clear() + self.sp_parents_model.clear() + self.ap_parents_model.clear() + self.ap_data.set_text('') def load_family(self,family=None): self.person = self.parent.active_person if not self.person: + self.clear() return n = "%s\n\tb. %s\n\td. %s " % (GrampsCfg.nameof(self.person), diff --git a/gramps2/src/PedView.py b/gramps2/src/PedView.py index ede1124aa..20bb6d194 100644 --- a/gramps2/src/PedView.py +++ b/gramps2/src/PedView.py @@ -144,15 +144,18 @@ class PedigreeView: self.load_person = lp self.presel_descendants = [] - def load_canvas(self, person): - """Redraws the pedigree view window, using the passed person - as the root person of the tree.""" - + def clear(self): for i in self.canvas_items: i.destroy() for i in self.boxes: i.cleanup() - + + def load_canvas(self, person): + """Redraws the pedigree view window, using the passed person + as the root person of the tree.""" + + self.clear() + if person is not self.active_person: del self.presel_descendants[:] self.active_person = person diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index b61891a47..3e65dd2cc 100755 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -601,7 +601,9 @@ class Gramps: self.change_active_person(None) for model in self.pl_page: model.clear() + self.family_view.clear() self.family_view.load_family() + self.pedigree_view.clear() self.source_view.load_sources() self.place_view.load_places() self.media_view.load_media()