astrodatagui: fix thread spawn race condition

This commit is contained in:
2024-08-13 11:00:16 +02:00
parent 979c9b30c5
commit c6bbf8d772
+1 -2
View File
@@ -363,13 +363,12 @@ class AstrodataGUI(QtWidgets.QMainWindow):
self.flaredetectorPreview.setPeriodogramState(periodogramEnabled, method, view)
def btCountAllFlaresClickedDone(self, allFlaresDictList):
self.calcAllFlaresThread = None
self.btCountAllFlares.setEnabled(True)
self.AllFlaresWindow = FlareSummaryPlotGUI(allFlaresDictList)
self.AllFlaresWindow.show()
def btCountAllFlaresClicked(self):
if(self.calcAllFlaresThread is None):
if(self.calcAllFlaresThread is None or self.calcAllFlaresThread.isFinished()):
self.btCountAllFlares.setEnabled(False)
allStarsDictList = pd.DataFrame(columns=["StarName",
"SpType",