From 896ecd29497e9691d2bf8ae9ae031b9b8307e9e8 Mon Sep 17 00:00:00 2001 From: Raphael Ackermann Date: Thu, 28 Feb 2008 00:29:51 +0000 Subject: [PATCH] 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 svn: r10133 --- ChangeLog | 5 +++++ src/Editors/_EditNote.py | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) 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,