4839: Old notes info is kept when a new family tree is created. Fixed Notes
svn: r17141
This commit is contained in:
parent
a0dbf6c92b
commit
d011a9164b
@ -82,6 +82,13 @@ class Notes(Gramplet):
|
|||||||
else:
|
else:
|
||||||
self.set_has_data(False)
|
self.set_has_data(False)
|
||||||
|
|
||||||
|
def clear_text(self):
|
||||||
|
self.left.set_sensitive(False)
|
||||||
|
self.right.set_sensitive(False)
|
||||||
|
self.texteditor.set_text(StyledText())
|
||||||
|
self.page.set_text('')
|
||||||
|
self.current = 0
|
||||||
|
|
||||||
def display_note(self):
|
def display_note(self):
|
||||||
"""
|
"""
|
||||||
Display the current note.
|
Display the current note.
|
||||||
@ -146,6 +153,7 @@ class PersonNotes(Notes):
|
|||||||
if active:
|
if active:
|
||||||
self.get_notes(active)
|
self.get_notes(active)
|
||||||
else:
|
else:
|
||||||
|
self.clear_text()
|
||||||
self.set_has_data(False)
|
self.set_has_data(False)
|
||||||
|
|
||||||
class EventNotes(Notes):
|
class EventNotes(Notes):
|
||||||
@ -168,6 +176,7 @@ class EventNotes(Notes):
|
|||||||
if active:
|
if active:
|
||||||
self.get_notes(active)
|
self.get_notes(active)
|
||||||
else:
|
else:
|
||||||
|
self.clear_text()
|
||||||
self.set_has_data(False)
|
self.set_has_data(False)
|
||||||
|
|
||||||
class FamilyNotes(Notes):
|
class FamilyNotes(Notes):
|
||||||
@ -190,6 +199,7 @@ class FamilyNotes(Notes):
|
|||||||
if active:
|
if active:
|
||||||
self.get_notes(active)
|
self.get_notes(active)
|
||||||
else:
|
else:
|
||||||
|
self.clear_text()
|
||||||
self.set_has_data(False)
|
self.set_has_data(False)
|
||||||
|
|
||||||
class PlaceNotes(Notes):
|
class PlaceNotes(Notes):
|
||||||
@ -212,6 +222,7 @@ class PlaceNotes(Notes):
|
|||||||
if active:
|
if active:
|
||||||
self.get_notes(active)
|
self.get_notes(active)
|
||||||
else:
|
else:
|
||||||
|
self.clear_text()
|
||||||
self.set_has_data(False)
|
self.set_has_data(False)
|
||||||
|
|
||||||
class SourceNotes(Notes):
|
class SourceNotes(Notes):
|
||||||
@ -234,6 +245,7 @@ class SourceNotes(Notes):
|
|||||||
if active:
|
if active:
|
||||||
self.get_notes(active)
|
self.get_notes(active)
|
||||||
else:
|
else:
|
||||||
|
self.clear_text()
|
||||||
self.set_has_data(False)
|
self.set_has_data(False)
|
||||||
|
|
||||||
class RepositoryNotes(Notes):
|
class RepositoryNotes(Notes):
|
||||||
@ -256,6 +268,7 @@ class RepositoryNotes(Notes):
|
|||||||
if active:
|
if active:
|
||||||
self.get_notes(active)
|
self.get_notes(active)
|
||||||
else:
|
else:
|
||||||
|
self.clear_text()
|
||||||
self.set_has_data(False)
|
self.set_has_data(False)
|
||||||
|
|
||||||
class MediaNotes(Notes):
|
class MediaNotes(Notes):
|
||||||
@ -278,5 +291,6 @@ class MediaNotes(Notes):
|
|||||||
if active:
|
if active:
|
||||||
self.get_notes(active)
|
self.get_notes(active)
|
||||||
else:
|
else:
|
||||||
|
self.clear_text()
|
||||||
self.set_has_data(False)
|
self.set_has_data(False)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user