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

Skip to content

Commit 04ee64d

Browse files
committed
DOC: add comment to tests on why double processEvent
1 parent a097c6f commit 04ee64d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/tests/test_backend_qt5.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ def test_dpi_ratio_change():
145145

146146
qt_canvas.draw()
147147
qApp.processEvents()
148+
# this second processEvents is required to fully run the draw.
149+
# On `update` we notice the DPI has changed and trigger a
150+
# resize event to refresh, the second processEvents is
151+
# required to process that and fully update the window sizes.
148152
qApp.processEvents()
149153

150154
# The DPI and the renderer width/height change

0 commit comments

Comments
 (0)