From c0201ee5199f3170c89afbea73fdc3d54554d22d Mon Sep 17 00:00:00 2001 From: dehoni Date: Sun, 29 Oct 2023 00:57:59 +0100 Subject: [PATCH] allow plots for Pr batch --- .../qtgui/Perspectives/Inversion/InversionWidget.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/sas/qtgui/Perspectives/Inversion/InversionWidget.py b/src/sas/qtgui/Perspectives/Inversion/InversionWidget.py index 25f0ef2aa9..68931dc5df 100644 --- a/src/sas/qtgui/Perspectives/Inversion/InversionWidget.py +++ b/src/sas/qtgui/Perspectives/Inversion/InversionWidget.py @@ -166,7 +166,7 @@ def __init__(self, parent=None, data=None, tab_id=1): self.batchComplete = [] self.isBatch = False self.batchResultsWindow = None - self._allowPlots = False + self._allowPlots = True # Add validators self.setupValidators() @@ -621,6 +621,7 @@ def stopCalculation(self): self.showBatchOutput() self.isBatch = False self.isCalculating = False + self.enableButtons() def check_q_low(self, q_value=None): @@ -875,7 +876,7 @@ def removeData(self, data_list=None): self.prPlot = None self.dataPlot = None self.dataList.removeItem(self.dataList.currentIndex()) - self._allowPlots = False + self._allowPlots = True if not data_list: data_list = [self._data] self.closeDMax() @@ -982,6 +983,7 @@ def startThreadAll(self): self.isCalculating = True self.isBatch = True + self._allowPlots = True self.batchComplete = [] self.calculateAllButton.setText("Calculating...") self.startThread() @@ -1000,7 +1002,7 @@ def startNextBatchItem(self): calculate until all items are in the batchComplete list. """ self.isBatch = False - self._allowPlots = False + for index in range(len(self._dataList)): if index not in self.batchComplete: @@ -1288,7 +1290,7 @@ def _calculateUpdate(self, output_tuple): # Udpate internals and GUI self.updateDataList(self._data) - self._allowPlots = False + self._allowPlots = True self.updateGuiValues() self.saveToBatchResults() if self.isBatch: