10000 FIX: Make sure the macosx backend updates the canvas when shown · matplotlib/matplotlib@546393d · GitHub
[go: up one dir, main page]

Skip to content

Commit 546393d

Browse files
committed
FIX: Make sure the macosx backend updates the canvas when shown
Force a draw_idle() call on the macosx backend when a show() is called to update the canvas.
1 parent 3e79f1b commit 546393d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/backends/backend_macosx.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ def __init__(self, canvas, num):
9292
self.show()
9393
self.canvas.draw_idle()
9494

95+
def show(self):
96+
# docstring inherited
97+
if self.canvas.figure.stale:
98+
self.canvas.draw_idle()
99+
super().show()
100+
95101
def close(self):
96102
Gcf.destroy(self)
97103

0 commit comments

Comments
 (0)
0