diff --git a/gramps/gui/editors/editcitation.py b/gramps/gui/editors/editcitation.py index fc5c6eba4ed..b8efb358ed6 100644 --- a/gramps/gui/editors/editcitation.py +++ b/gramps/gui/editors/editcitation.py @@ -341,9 +341,9 @@ def save(self, *obj): 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): """ diff --git a/gramps/gui/editors/editevent.py b/gramps/gui/editors/editevent.py index ccda9ef4833..af56791abc8 100644 --- a/gramps/gui/editors/editevent.py +++ b/gramps/gui/editors/editevent.py @@ -278,9 +278,9 @@ def save(self, *obj): 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): """ diff --git a/gramps/gui/editors/editmedia.py b/gramps/gui/editors/editmedia.py index 392811a645e..d90dbf47101 100644 --- a/gramps/gui/editors/editmedia.py +++ b/gramps/gui/editors/editmedia.py @@ -334,9 +334,9 @@ def save(self, *obj): 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): """ diff --git a/gramps/gui/editors/editnote.py b/gramps/gui/editors/editnote.py index a3e5daefb4c..cf819d66bf1 100644 --- a/gramps/gui/editors/editnote.py +++ b/gramps/gui/editors/editnote.py @@ -346,9 +346,9 @@ def save(self, *obj): 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):