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 c8c6fbd

Browse filesBrowse files
committed
Merge pull request #4943 from jrevans/issue15
FIX: qt backend has more draws than necessary
2 parents 09e044c + fb2e928 commit c8c6fbd
Copy full SHA for c8c6fbd

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+3
-1
lines changed

‎lib/matplotlib/backends/backend_qt5agg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt5agg.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ def paintEvent(self, e):
7171
In Qt, all drawing should be done inside of here when a widget is
7272
shown onscreen.
7373
"""
74-
FigureCanvasAgg.draw(self)
74+
# If we have not rendered the Agg backend yet, do so now.
75+
if not hasattr(self, 'renderer'):
76+
FigureCanvasAgg.draw(self)
7577

7678
# FigureCanvasQT.paintEvent(self, e)
7779
if DEBUG:

0 commit comments

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