From 2a17f8d99f168211589db728457ed720ab2c8757 Mon Sep 17 00:00:00 2001 From: Steve Youngs Date: Wed, 8 Jan 2020 20:42:37 +0000 Subject: [PATCH] EditRepository now stores the callback passed to __init__ and calls it during save(). This is for consistency with other types of EditPrimary. --- gramps/gui/editors/editrepository.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gramps/gui/editors/editrepository.py b/gramps/gui/editors/editrepository.py index d9dc6611bf3..80e9c1f154f 100644 --- a/gramps/gui/editors/editrepository.py +++ b/gramps/gui/editors/editrepository.py @@ -65,7 +65,7 @@ def __init__(self, dbstate, uistate, track, repository, callback=None): EditPrimary.__init__(self, dbstate, uistate, track, repository, dbstate.db.get_repository_from_handle, - dbstate.db.get_repository_from_gramps_id) + dbstate.db.get_repository_from_gramps_id, callback) def empty_object(self): return Repository() @@ -208,6 +208,8 @@ def save(self, *obj): self.db.commit_repository(self.obj, trans) self._do_close() + if self.callback: + self.callback(self.obj) class DeleteRepositoryQuery: def __init__(self, dbstate, uistate, repository, sources):