Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FIX: qt recursive draw #9199

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

Filter by extension

Filter by extension

Conversations
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
TST: add extra processEvents call in test
The resizeEvent call does put another paint onto the event queue,
however it seems that processEvents only processes events on the queue
when it is called (not events added while it is processing).  This is
not clearly documented, but makes sense as this method is for keeping
GUIs responsive during otherwise long-running tasks so it should not
be able to extend it's run indefinitely by populating the queue.

This is required because a previous commit removed the explicit
processEvents call in paintEvent as it would occasionally cause
recursive painting which may kill Qt.
  • Loading branch information
tacaswell committed Sep 22, 2017
commit 884334de7c902bffa0d9f53d08aedbcb39eafc9c
1 change: 1 addition & 0 deletions lib/matplotlib/tests/test_backend_qt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ def test_dpi_ratio_change():

qt_canvas.draw()
qApp.processEvents()
qApp.processEvents()

# The DPI and the renderer width/height change
assert fig.dpi == 240
Expand Down