Skip to content

Commit

Permalink
allow plots for Pr batch
Browse files Browse the repository at this point in the history
  • Loading branch information
dehoni committed Oct 28, 2023
1 parent b642759 commit c0201ee
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/sas/qtgui/Perspectives/Inversion/InversionWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -982,6 +983,7 @@ def startThreadAll(self):

self.isCalculating = True
self.isBatch = True
self._allowPlots = True
self.batchComplete = []
self.calculateAllButton.setText("Calculating...")
self.startThread()
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c0201ee

Please sign in to comment.