Skip to content

Commit d916aae

Browse files
committed
FIX: allow re-shown Qt windows to be re-destroyed
When a Qt window is closed we do not strip off the Qt components and it is technically possible to re-show it. However, the latch we use to detect re-entrant destruction does not get reset so the figure can not be re-destroyed.
1 parent ea66786 commit d916aae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/matplotlib/backends/backend_qt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ def start_main_loop(cls):
602602
qt_compat._exec(qapp)
603603

604604
def show(self):
605+
self.window._destroying = False
605606
self.window.show()
606607
if mpl.rcParams['figure.raise_window']:
607608
self.window.activateWindow()

0 commit comments

Comments
 (0)