Skip to content

Commit

Permalink
EditRepository now stores the callback passed to __init__ and calls i…
Browse files Browse the repository at this point in the history
…t during save().

This is for consistency with other types of EditPrimary.
  • Loading branch information
stevenyoungs authored and prculley committed Apr 15, 2020
1 parent 349edca commit 2a17f8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gramps/gui/editors/editrepository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 2a17f8d

Please sign in to comment.