We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 432fa7d + d9add67 commit 477f781Copy full SHA for 477f781
lib/matplotlib/backends/backend_qtagg.py
@@ -71,6 +71,15 @@ def paintEvent(self, event):
71
finally:
72
painter.end()
73
74
+ def print_figure(self, *args, **kwargs):
75
+ super().print_figure(*args, **kwargs)
76
+ # In some cases, Qt will itself trigger a paint event after closing the file
77
+ # save dialog. When that happens, we need to be sure that the internal canvas is
78
+ # re-drawn. However, if the user is using an automatically-chosen Qt backend but
79
+ # saving with a different backend (such as pgf), we do not want to trigger a
80
+ # full draw in Qt, so just set the flag for next time.
81
+ self._draw_pending = True
82
+
83
84
@_BackendQT.export
85
class _BackendQTAgg(_BackendQT):
0 commit comments