EditRepository now stores the callback passed to __init__ and calls it during save().
This is for consistency with other types of EditPrimary.
This commit is contained in:
parent
349edca738
commit
2a17f8d99f
@ -65,7 +65,7 @@ class EditRepository(EditPrimary):
|
|||||||
|
|
||||||
EditPrimary.__init__(self, dbstate, uistate, track, repository,
|
EditPrimary.__init__(self, dbstate, uistate, track, repository,
|
||||||
dbstate.db.get_repository_from_handle,
|
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):
|
def empty_object(self):
|
||||||
return Repository()
|
return Repository()
|
||||||
@ -208,6 +208,8 @@ class EditRepository(EditPrimary):
|
|||||||
self.db.commit_repository(self.obj, trans)
|
self.db.commit_repository(self.obj, trans)
|
||||||
|
|
||||||
self._do_close()
|
self._do_close()
|
||||||
|
if self.callback:
|
||||||
|
self.callback(self.obj)
|
||||||
|
|
||||||
class DeleteRepositoryQuery:
|
class DeleteRepositoryQuery:
|
||||||
def __init__(self, dbstate, uistate, repository, sources):
|
def __init__(self, dbstate, uistate, repository, sources):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user