Clear displays after a new database is created.
svn: r1305
This commit is contained in:
parent
a942d4c594
commit
8637d33501
@ -282,11 +282,18 @@ class FamilyView:
|
|||||||
person = family.getMother()
|
person = family.getMother()
|
||||||
self.parent.change_active_person(person)
|
self.parent.change_active_person(person)
|
||||||
self.load_family(family)
|
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):
|
def load_family(self,family=None):
|
||||||
self.person = self.parent.active_person
|
self.person = self.parent.active_person
|
||||||
if not self.person:
|
if not self.person:
|
||||||
|
self.clear()
|
||||||
return
|
return
|
||||||
|
|
||||||
n = "%s\n\tb. %s\n\td. %s " % (GrampsCfg.nameof(self.person),
|
n = "%s\n\tb. %s\n\td. %s " % (GrampsCfg.nameof(self.person),
|
||||||
|
@ -144,15 +144,18 @@ class PedigreeView:
|
|||||||
self.load_person = lp
|
self.load_person = lp
|
||||||
self.presel_descendants = []
|
self.presel_descendants = []
|
||||||
|
|
||||||
def load_canvas(self, person):
|
def clear(self):
|
||||||
"""Redraws the pedigree view window, using the passed person
|
|
||||||
as the root person of the tree."""
|
|
||||||
|
|
||||||
for i in self.canvas_items:
|
for i in self.canvas_items:
|
||||||
i.destroy()
|
i.destroy()
|
||||||
for i in self.boxes:
|
for i in self.boxes:
|
||||||
i.cleanup()
|
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:
|
if person is not self.active_person:
|
||||||
del self.presel_descendants[:]
|
del self.presel_descendants[:]
|
||||||
self.active_person = person
|
self.active_person = person
|
||||||
|
@ -601,7 +601,9 @@ class Gramps:
|
|||||||
self.change_active_person(None)
|
self.change_active_person(None)
|
||||||
for model in self.pl_page:
|
for model in self.pl_page:
|
||||||
model.clear()
|
model.clear()
|
||||||
|
self.family_view.clear()
|
||||||
self.family_view.load_family()
|
self.family_view.load_family()
|
||||||
|
self.pedigree_view.clear()
|
||||||
self.source_view.load_sources()
|
self.source_view.load_sources()
|
||||||
self.place_view.load_places()
|
self.place_view.load_places()
|
||||||
self.media_view.load_media()
|
self.media_view.load_media()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user