From 00618a99f99a429bab361be601970e8e4e5ee715 Mon Sep 17 00:00:00 2001 From: Talmo Pereira Date: Tue, 17 Dec 2024 11:33:51 -0800 Subject: [PATCH] Try adding cleanup in `QtImageDirectoryWidget` --- sleap/gui/widgets/imagedir.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sleap/gui/widgets/imagedir.py b/sleap/gui/widgets/imagedir.py index 2a709edbb..3c6f22da1 100644 --- a/sleap/gui/widgets/imagedir.py +++ b/sleap/gui/widgets/imagedir.py @@ -47,6 +47,13 @@ def __init__( self.resize(360, 400) + # Call cleanup method when application exits to end worker thread. + # Note: This is commented out in favor of the MainWindow.closeEvent() path. + self.destroyed.connect(self.cleanup) + # app = QApplication.instance() + # if app: + # app.aboutToQuit.connect(self.cleanup) + if self.filters: self.filter_menu = QtWidgets.QComboBox() self.filter_menu.addItems([filter[0] for filter in self.filters])