-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
qt backend draw_idle doesn't work #4944
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
Conversation
…essing before a Qt draw happens.
attn @pwuertz |
attn @mfitzp |
I don't see why this is should be necessary. Calling update() is designed to do the exact same thing, it posts a paintEvent to the event loop and returns immediately to the event processing code. If the render thread determines that it has time to draw another frame, it draws another frame. Is there an example where the mpl callbacks do not get processed in time and are causing an event pile up? After we eliminated all synchronous draw calls I haven't seen this behaviour any more. |
I might be missing something here but the patch:
...replaces the call to
...this looks to me as if it would just block the I'm wondering if postponing the call to
|
@mfitzp The draw() call is reimplemented in the qt backend and will force an agg redraw + emit a qt update. This however eliminates the recent optimization where the agg redraw is done in paintEvent. As discussed in another issue, there is a problem when using interactive mode where stale callbacks are emitting draw_idle calls from within a agg draw call. As I understand it, this is a bug in matplotlib. The self._idle flag in this pull request acts as a workaround for that. |
@pwuertz ah, thanks. I was looking up the inheritance rather than down:
I was confused as the @jrevans is the purpose of this to postpone Qt redraw? Why use |
You need to consider this with the qt.paintEvent pr for it to make sense. The _idle flash was there for a long time and the removed. I will have an alternate pr to this pair in soon. On Wed, Aug 19, 2015, 7:46 AM Martin Fitzpatrick notifications@github.com
|
FIX: revert changes to qt draw_idle
Restored 'draw_idle' method to allow for mpl callbacks to finish processing before a Qt draw happens.
This addresses an issue in #4897.