Skip to content
Snippets Groups Projects
Commit 9912aa01 authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Close all plots when app shuts down.

Refs #21567
parent 721abf00
No related branches found
No related tags found
No related merge requests found
......@@ -324,6 +324,15 @@ class MainWindow(QMainWindow):
row[0].dockwidget.show()
row[0].dockwidget.raise_()
# ----------------------- Events ---------------------------------
def closeEvent(self, event):
# Close all open plots
# We don't want this at module scope here
import matplotlib.pyplot as plt #noqa
plt.close('all')
event.accept()
# ----------------------- Slots ---------------------------------
def open_file(self):
# todo: when more file types are added this should
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment