-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Doc draw event details #9505
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
Doc draw event details #9505
Conversation
.. warning :: | ||
|
||
Calling ``canvas.draw`` and ``canvas.blit`` in these callbacks may | ||
not be safe with all backends and may cause infinite recursion. |
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.
nice :)
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.
It is nice to at least warn the user they have acquired a foot-cannon.....
8d6e1d3
to
5a6ae81
Compare
pep8 fixed and force-pushed |
lib/matplotlib/backend_bases.py
Outdated
|
||
In most backends callbacks subscribed to this callback will be | ||
fired after the rendering is complete but before the screen is | ||
update. Any extra artists drawn to the canvas's renderer will |
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.
update->updated
lib/matplotlib/backend_bases.py
Outdated
In most backends callbacks subscribed to this callback will be | ||
fired after the rendering is complete but before the screen is | ||
update. Any extra artists drawn to the canvas's renderer will | ||
be reflected without an explicate call to ``blit``. |
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.
explicate -> explicit (unless an "explicate call" is a jargon I don't know.)
This does not prevent the recursion, which may segfault Qt, but prevents it from infinitely recursing if Qt does not crash. Closes matplotlib#9406
5a6ae81
to
9b8a944
Compare
Spelling fixed and force-pushed. |
@@ -1428,6 +1428,17 @@ class DrawEvent(Event): | |||
In addition to the :class:`Event` attributes, the following event | |||
attributes are defined: |
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.
I think this sentence needs to get moved down now? Sorry should have read the whole docstrig before my previous comment...
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.
Done, but the diff resolved with out this line changing.
Summarizes the discussion from #9406 in the docs and tweaks the latch on the Qt*AGg.__draw_idle_agg to prevent infinite recession (will still get one level) if miss-used.