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

Appearance settings

Commit 04a2d11

Browse filesBrowse files
dstansbytacaswell
authored andcommitted
Backport PR #15206: FIX: be more forgiving about expecting internal state in draw_idle
Merge pull request #15206 from tacaswell/fix_python_ion_second_qtcanvas_init FIX: be more forgiving about expecting internal state in draw_idle Conflicts: lib/matplotlib/tests/test_backend_qt.py - no tests on this branch, did not backport test
1 parent 053eea9 commit 04a2d11
Copy full SHA for 04a2d11

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎lib/matplotlib/backends/backend_qt5.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt5.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,8 @@ def draw_idle(self):
506506
# current event loop in order to ensure thread affinity and to
507507
# accumulate multiple draw requests from event handling.
508508
# TODO: queued signal connection might be safer than singleShot
509-
if not (self._draw_pending or self._is_drawing):
509+
if not (getattr(self, '_draw_pending', False) or
510+
getattr(self, '._is_drawing', False)):
510511
self._draw_pending = True
511512
QtCore.QTimer.singleShot(0, self._draw_idle)
512513

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.