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:
parent
2a17f8d99f
commit
a5b5910f7f
@ -341,9 +341,9 @@ class EditCitation(EditPrimary):
|
||||
self.obj.set_gramps_id(self.db.find_next_citation_gramps_id())
|
||||
self.db.commit_citation(self.obj, trans)
|
||||
|
||||
self._do_close()
|
||||
if self.callback:
|
||||
self.callback(self.obj.get_handle())
|
||||
self._do_close()
|
||||
|
||||
def data_has_changed(self):
|
||||
"""
|
||||
|
@ -278,9 +278,9 @@ class EditEvent(EditPrimary):
|
||||
self.obj.set_gramps_id(self.db.find_next_event_gramps_id())
|
||||
self.db.commit_event(self.obj, trans)
|
||||
|
||||
self._do_close()
|
||||
if self.callback:
|
||||
self.callback(self.obj)
|
||||
self._do_close()
|
||||
|
||||
def data_has_changed(self):
|
||||
"""
|
||||
|
@ -334,9 +334,9 @@ class EditMedia(EditPrimary):
|
||||
self.obj.set_gramps_id(self.db.find_next_media_gramps_id())
|
||||
self.db.commit_media(self.obj, trans)
|
||||
|
||||
self._do_close()
|
||||
if self.callback:
|
||||
self.callback(self.obj)
|
||||
self._do_close()
|
||||
|
||||
def data_has_changed(self):
|
||||
"""
|
||||
|
@ -346,9 +346,9 @@ class EditNote(EditPrimary):
|
||||
self.obj.set_gramps_id(self.db.find_next_note_gramps_id())
|
||||
self.db.commit_note(self.obj, trans)
|
||||
|
||||
self._do_close()
|
||||
if self.callback:
|
||||
self.callback(self.obj.get_handle())
|
||||
self._do_close()
|
||||
|
||||
class DeleteNoteQuery:
|
||||
def __init__(self, dbstate, uistate, note, the_lists):
|
||||
|
Loading…
Reference in New Issue
Block a user