From c6bbf8d772086393303487bfc95d09db4fd29ab9 Mon Sep 17 00:00:00 2001 From: SGCMarkus Date: Tue, 13 Aug 2024 11:00:16 +0200 Subject: [PATCH] astrodatagui: fix thread spawn race condition --- main/astrodatagui/AstrodataGUI.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main/astrodatagui/AstrodataGUI.py b/main/astrodatagui/AstrodataGUI.py index f079be2..bf783e6 100644 --- a/main/astrodatagui/AstrodataGUI.py +++ b/main/astrodatagui/AstrodataGUI.py @@ -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",