Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FIX: only try to update blit caches if the canvas we expect#25085

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tacaswell merged 3 commits intomatplotlib:mainfromtacaswell:fix/widget_pdf_save
Feb 9, 2023

Conversation

tacaswell
Copy link
Member

Because we may switch the canvas to a different type (that may not support blitting) when saving, check it_clear that the current canvas is the canvas we expect when we update the blitting caches on the draw_event callback.

Closes#25075

@tacaswelltacaswell added this to thev3.7.0 milestoneJan 25, 2023
@@ -1088,7 +1088,7 @@ def __init__(self, ax, labels, actives=None, *, useblit=True,

def _clear(self, event):
"""Internal event handler to clear the buttons."""
if self.ignore(event):
if self.ignore(event) or self.canvas is not self.ax.figure.canvas:
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if you want to wrap this in a small method with an explanation like your explanation below as the doc string:

def _not_orig_canvas():    """    Explain    """"    return self.canvas is not self.ax.figure.canvas

Perhaps thats too much cruft, but otherwise this is a bit of a mysterious clause.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

done.

@ksundenksunden added the Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. labelFeb 3, 2023
Because we may switch the canvas to a different type (that may notsupport blitting) when saving, check it `_clear` that the current canvasis the canvas we expect when we update the blitting caches on thedraw_event callback.Closesmatplotlib#25075
@ksunden
Copy link
Member

Did the rebase as it was the result of conflicts with undeprecatingclear in widgets

@jklymak
Copy link
Member

Anyone should merge when Azure finally times out ;-)

@ksunden
Copy link
Member

I'm pretty sure the failed Azure test was just a known somewhat flaky test... but it was in facttest_blit, so going to make sure by re-running.

@tacaswelltacaswell merged commit887f39f intomatplotlib:mainFeb 9, 2023
@tacaswelltacaswell deleted the fix/widget_pdf_save branchFebruary 9, 2023 23:14
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestFeb 9, 2023
ksunden added a commit that referenced this pull requestFeb 10, 2023
…085-on-v3.7.xBackport PR#25085 on branch v3.7.x (FIX: only try to update blit caches if the canvas we expect)
@ksundenksunden mentioned this pull requestFeb 20, 2023
6 tasks
@tacaswelltacaswell mentioned this pull requestJun 26, 2024
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak approved these changes

@ksundenksundenksunden approved these changes

Assignees
No one assigned
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Milestone
v3.7.0
Development

Successfully merging this pull request may close these issues.

[Bug]: Widget blitting broken when saving as PDF
3 participants
@tacaswell@ksunden@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp