remove newly introduced bug in start_analysis_thread

This commit is contained in:
2023-07-26 16:10:49 +02:00
parent a6b60c30ce
commit 0f6889b54c

16
base.py
View File

@@ -339,7 +339,7 @@ class BaseWindow(QMainWindow):
self.messages = messages
try:
if input_parameters['debug']:
print("AnalysisThread", self.input_parameters)
print("AnalysisThread", self.input_parameters, flush=True)
except KeyError:
pass
@@ -349,7 +349,8 @@ class BaseWindow(QMainWindow):
def run(self):
"""Run thread
"""
print("RUN IN BASE CLASS", flush=True)
all_dict = self.analysis_procedure.measure_and_analyze(
self.input_parameters)
@@ -1089,7 +1090,7 @@ class BaseWindow(QMainWindow):
def add_to_hdf(self, dataH5=None, proc=True, raw=False):
""" Abstract method to be overwritten by user. Optional.
"""
return
'''
QM = QMessageBox()
QM.setText(
@@ -1100,6 +1101,7 @@ class BaseWindow(QMainWindow):
)
QM.exec()
'''
return
@Slot()
def save_to_hdf(self):
@@ -1283,7 +1285,7 @@ class BaseWindow(QMainWindow):
def send_to_elog(self):
""" Response to elog_action; normally overwritten
"""
if not self.verify_send_to_elog():
if not self.verify_send_to_elog():
return
'''
if self.analysis_thread is not None:
@@ -1756,13 +1758,11 @@ class BaseWindow(QMainWindow):
self.analysis_thread.started.connect(self.analysis_thread_started)
self.analysis_thread.finished.connect(self.analysis_thread_finished)
if self.verify_analysis_thread():
self.analysis_thread.start()
self.analysis_thread.start()
QApplication.processEvents()
@Slot()
def analysis_thread_started(self):
""" Change state of widgets when measuring