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

Call Refresh on FigureCanvasWxAgg.draw#30893

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

Open
hydrocat wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromhydrocat:main

Conversation

@hydrocat
Copy link

This fixes a bug in which some plots are not redrawn under wayland.

PR summary

  • Why is this change necessary?

  • What problem does it solve?
    Under wayland and wxwidgets, the canvas was only being redraw after user interaction. Programmatic updates from code, such as a background task, would somehow, not trigger a plot redraw.

  • What is the reasoning for this implementation?
    Sorry, not much reasoning. I followed the code path and sprinkled what I thought could work. The best I can think of is that wxwidgets is not being notified of the need to repaint the canvas.

I tried to find a way to force redraw of the plot canvas in wxWidgets backend. This place seems to fix it.

Running a demo script withGDK_BACKEND=x11 python demo.py fixes it too, but then it is not using wayland.

PR checklist

This fixes a bug in which some widgets are not redrawn under wayland.
@newville
Copy link
Contributor

@hydrocat Thanks for looking into this.
If this is needed only for Wayland (see Note athttps://docs.wxpython.org/wx.Window.html#wx.Window.Update), is it possible to add a test for "on Wayland" and run thisself.Refresh() only then? Perhaps one of the methods fromwx.PlatformInformation clearly identifies Wayland?

Also: should thisself.Refresh() be in_FigureCanvasWxBase.gui_repaint()? That is, why wouldn't everyrepaint need this?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

wxPython 4.0: backends not yet working w. Wayland / Ubuntu 17

2 participants

@hydrocat@newville

[8]ページ先頭

©2009-2025 Movatter.jp