Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
solution: All subclasses of LocationEvent could be used in cbook.callbacks before being fully initialized - issue 15139#16948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
@anntzer I don't think this collides with#16931 (which will fix the same bug by not doing the processing in Thanks for this@Stefan-Mitic ! It looks like there are a couple of un-related commits on this branch. Could you please remove them? Seehttps://matplotlib.org/devel/gitwash/development_workflow.html?highlight=rebase#rewriting-commit-history for instructions. Remember that when you push the re-written branch to github tonot do what it suggests about merging and instead use |
I can handle the rebase, sure. |
Thanks for the help@tacaswell |
So if I read#15139 correctly, the same thing should be done for |
Yes@QuLogic, I added it to |
Can you add tests? I think it should work in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
In both cases, there should be a comment why the super-init call is deferred to the end. Usually it's in the first line and there's a danger that people will move it back later, or at least are confused why it's at the end.
Stefan-Mitic commentedApr 4, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@QuLogic, I'm not sure how to trigger a keypress event to invoke my callback function.
|
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
I don't disagree, but we have the event system we have. With |
…nt could be used in cbook.callbacks before being fully initialized - issue 15139
…948-on-v3.2.xBackport PR#16948 on branch v3.2.x (solution: All subclasses of LocationEvent could be used in cbook.callbacks before being fully initialized - issue 15139)
PR Summary
Modified the call to LocationEvent.init() to be after MouseButton initialization in MouseEvent.init(). The reason for this is the error occurs because callback.process is invoked before the initialization.
MouseEvent is a subclass of LocationEvent, so it is safe to say that motion_notify_event() can be called by a child class of LocationEvent.
Issue Ref:#15139
PR Checklist