For all types of EditPrimary window, consistently call self._do_close() before self.callback(), during save()

EditFamily, EditPerson, EditPlace, EditRepository and EditSource already call self._do_close() before self.callback().
This commit is contained in:
Steve Youngs 2020-01-08 20:49:29 +00:00 committed by Paul Culley
parent 2a17f8d99f
commit a5b5910f7f
4 changed files with 4 additions and 4 deletions

View File

@ -341,9 +341,9 @@ class EditCitation(EditPrimary):
self.obj.set_gramps_id(self.db.find_next_citation_gramps_id()) self.obj.set_gramps_id(self.db.find_next_citation_gramps_id())
self.db.commit_citation(self.obj, trans) self.db.commit_citation(self.obj, trans)
self._do_close()
if self.callback: if self.callback:
self.callback(self.obj.get_handle()) self.callback(self.obj.get_handle())
self._do_close()
def data_has_changed(self): def data_has_changed(self):
""" """

View File

@ -278,9 +278,9 @@ class EditEvent(EditPrimary):
self.obj.set_gramps_id(self.db.find_next_event_gramps_id()) self.obj.set_gramps_id(self.db.find_next_event_gramps_id())
self.db.commit_event(self.obj, trans) self.db.commit_event(self.obj, trans)
self._do_close()
if self.callback: if self.callback:
self.callback(self.obj) self.callback(self.obj)
self._do_close()
def data_has_changed(self): def data_has_changed(self):
""" """

View File

@ -334,9 +334,9 @@ class EditMedia(EditPrimary):
self.obj.set_gramps_id(self.db.find_next_media_gramps_id()) self.obj.set_gramps_id(self.db.find_next_media_gramps_id())
self.db.commit_media(self.obj, trans) self.db.commit_media(self.obj, trans)
self._do_close()
if self.callback: if self.callback:
self.callback(self.obj) self.callback(self.obj)
self._do_close()
def data_has_changed(self): def data_has_changed(self):
""" """

View File

@ -346,9 +346,9 @@ class EditNote(EditPrimary):
self.obj.set_gramps_id(self.db.find_next_note_gramps_id()) self.obj.set_gramps_id(self.db.find_next_note_gramps_id())
self.db.commit_note(self.obj, trans) self.db.commit_note(self.obj, trans)
self._do_close()
if self.callback: if self.callback:
self.callback(self.obj.get_handle()) self.callback(self.obj.get_handle())
self._do_close()
class DeleteNoteQuery: class DeleteNoteQuery:
def __init__(self, dbstate, uistate, note, the_lists): def __init__(self, dbstate, uistate, note, the_lists):