Skip to content

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

Merged
merged 3 commits into from
Oct 23, 2017
Merged

Conversation

tacaswell
Copy link
Member

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.

@tacaswell tacaswell added this to the v2.1.1 milestone Oct 21, 2017
.. warning ::

Calling ``canvas.draw`` and ``canvas.blit`` in these callbacks may
not be safe with all backends and may cause infinite recursion.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice :)

Copy link
Member Author

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.....

@tacaswell
Copy link
Member Author

pep8 fixed and force-pushed


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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update->updated

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``.
Copy link
Member

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
@tacaswell tacaswell force-pushed the doc_draw_event_details branch from 5a6ae81 to 9b8a944 Compare October 23, 2017 01:13
@tacaswell
Copy link
Member Author

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:
Copy link
Member

@jklymak jklymak Oct 23, 2017

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...

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants