8000 FIX: set internal flags first in FigureCanvasBase by tacaswell · Pull Request #5150 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

FIX: set internal flags first in FigureCanvasBase #5150

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 7 commits into from
Sep 27, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations < 8000 include-fragment data-nonce="v2:3bc83e03-4780-b0a0-dba4-2e06f358ef09" data-view-component="true">
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PRF: prevent possible over draws
Set the `_is_saving` flag as early as possible in `print_figure`
to prevent aggressive auto-drawing during the same process.
  • Loading branch information
tacaswell committed Sep 26, 2015
commit 644b4b246d58543448c61ba2d580038a75636c01
3 changes: 2 additions & 1 deletion lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2123,6 +2123,8 @@ def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
tight bbox is calculated.

"""
self._is_saving = True

if format is None:
# get format from filename, or from backend's default filetype
if cbook.is_string_like(filename):
Expand Down Expand Up @@ -2216,7 +2218,6 @@ def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
else:
_bbox_inches_restore = None

self._is_saving = True
try:
#result = getattr(self, method_name)(
result = print_method(
Expand Down
0