From d011a9164b0135f7be4245ed5bc256e0067327ce Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Mon, 18 Apr 2011 13:02:25 +0000 Subject: [PATCH] 4839: Old notes info is kept when a new family tree is created. Fixed Notes svn: r17141 --- src/plugins/gramplet/Notes.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/plugins/gramplet/Notes.py b/src/plugins/gramplet/Notes.py index 73d6b40b2..d4023e974 100644 --- a/src/plugins/gramplet/Notes.py +++ b/src/plugins/gramplet/Notes.py @@ -82,6 +82,13 @@ class Notes(Gramplet): else: 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): """ Display the current note. @@ -146,6 +153,7 @@ class PersonNotes(Notes): if active: self.get_notes(active) else: + self.clear_text() self.set_has_data(False) class EventNotes(Notes): @@ -168,6 +176,7 @@ class EventNotes(Notes): if active: self.get_notes(active) else: + self.clear_text() self.set_has_data(False) class FamilyNotes(Notes): @@ -190,6 +199,7 @@ class FamilyNotes(Notes): if active: self.get_notes(active) else: + self.clear_text() self.set_has_data(False) class PlaceNotes(Notes): @@ -212,6 +222,7 @@ class PlaceNotes(Notes): if active: self.get_notes(active) else: + self.clear_text() self.set_has_data(False) class SourceNotes(Notes): @@ -234,6 +245,7 @@ class SourceNotes(Notes): if active: self.get_notes(active) else: + self.clear_text() self.set_has_data(False) class RepositoryNotes(Notes): @@ -256,6 +268,7 @@ class RepositoryNotes(Notes): if active: self.get_notes(active) else: + self.clear_text() self.set_has_data(False) class MediaNotes(Notes): @@ -278,5 +291,6 @@ class MediaNotes(Notes): if active: self.get_notes(active) else: + self.clear_text() self.set_has_data(False)