Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In line with other editor windows, EditEvent.init accepts a callback parameter. Unlike other editor windows, EditEvent does not pass the callback parameter into EditPrimary.init, leaving self.callback=None in all cases. This PR fixes this such that self.callback = callback, as expected.
Justification
Editor window callback functions form an integral part of Form addon PR267. In PR267, the callback is used to perform additional operations, if the user OK'd the editor window.
Making the editor windows behave in a consisent way, allows consistent coding in PR267, in addition to making EditEvent behave as a casual observer would expect.
For a concrete example, look at PR267, actionutils.py,
add_event
and the symmmetry withcommit_person
that can be achieved if this PR is merged.Note
I have not comprehensively reviewed other editor window classes for the same problem. I have observed that EditRepository has a similar problem. A fix is not included in this PR as I have no immediate need to use EditRepository. I am prepared to review all editor window classes for this problem, if felt necessary.