diff --git a/QtPyLoT.py b/QtPyLoT.py index 26060c28..c268f38d 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -239,8 +239,10 @@ class MainWindow(QMainWindow): filterDlg = FilterOptionsDialog(titleString=fstring, parent=self, filterOptions=self.getFilterOptions()) - filterDlg.show() - filterDlg.closeEvent.connect(lambda: self.setFilterOptions(filterDlg.getFilterOptions())) + if filterDlg.exec_(): + filterOptions = filterDlg.getFilterOptions() + + self.setFilterOptions(filterOptions) def getFilterOptions(self): return self.filteroptions