diff --git a/ChangeLog b/ChangeLog index 65ccad6d9..dde5215a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-27 Raphael Ackermann + * src/Editors/_EditNote.py: empty_object() add extratype to object + 0001476: Opening the new note dialog/editor and cancelling shouldn't ask + to save changes. there are no changes + 2008-02-27 Raphael Ackermann * src/DbManager.py: rename glade variable to glade_xml_file diff --git a/src/Editors/_EditNote.py b/src/Editors/_EditNote.py index 86b003507..e99f2c31c 100644 --- a/src/Editors/_EditNote.py +++ b/src/Editors/_EditNote.py @@ -53,7 +53,7 @@ from Editors._EditPrimary import EditPrimary from DisplayTabs import GrampsTab, NoteBackRefList from GrampsWidgets import (MonitoredDataType, MonitoredCheckbox, MonitoredEntry, PrivacyButton) -from gen.lib import Note +import gen.lib from QuestionDialog import ErrorDialog #------------------------------------------------------------------------- @@ -147,9 +147,11 @@ class EditNote(EditPrimary): """Return an empty Note object for comparison for changes. It is used by the base class (EditPrimary). - """ - return Note() + empty_note = gen.lib.Note(); + if self.extratype: + empty_note.set_type(self.extratype[0]) + return empty_note def get_menu_title(self): if self.obj.get_handle(): @@ -203,7 +205,7 @@ class EditNote(EditPrimary): self.build_interface() def _setup_fields(self): - """Get control widgets and attached them to Note's attributes.""" + """Get control widgets and attach them to Note's attributes.""" self.type_selector = MonitoredDataType( self.top.get_widget('type'), self.obj.set_type,