-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure self._idle is set to True
in all cases
#2677
Conversation
Even if `draw` raises an exception.
Fixes issue raised in #2583 |
added block around `draw` in `idle_draw` which can raise an exception and will leave the window in a bad state.
Added try block around `draw` in `idle_draw`. If `draw` raises an exception the figure is never marked idle again and pyplot functions will not work as expect.
Added try block around `draw` in `idle_draw`. If `draw` raises an exception the figure is never marked idle again and pyplot functions will not work as expect.
Someone who is an expert at wx should take a look at this. I could not pattern match well enough to sort out how to fix this in |
I'm not a wx expert at all, and the draw_idle code is a bit convoluted, but it certainly looks to me like it does not suffer from the problem that was identified in the qt4 backend. Note that |
Reading through it again, I agree with @efiring that wx shouldn't have this problem. (I don't have wx on this computer to test). I also forgot the mac backend at the top. Can one of the mac devs test if this is an issue and if so fix it. |
Make sure self._idle is set to `True` in all cases
@pelson I am tad worried that this got merged without confirming that wx and osx don't show this issue. |
I just want to keep some momentum up on a proposed change which makes sense and IMHO is correct. If a problem is discovered in the WX and MacOS backends another PR can be created (and I'll try to merge that as soon as it is ready for it). In short, I think the work you did was good, and I wanted to be able to reduce the number of outstanding PRs by merging it. |
Even if
draw
raises an exception.