Skip to content

Commit

Permalink
update batchresults to final result when calculate all
Browse files Browse the repository at this point in the history
  • Loading branch information
dehoni committed Sep 4, 2023
1 parent b2fd716 commit 290e51d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/sas/qtgui/Perspectives/Inversion/InversionWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,13 @@ def stopCalculation(self):
self.stopCalcThread()
self.stopEstimationThread()
self.stopEstimateNTThread()
self.updateGuiValues()
# Show any batch calculations that successfully completed
if self.isBatch and self.batchResultsWindow is not None:
if self.isBatch and self.batchResultsWindow is not None:
self.showBatchOutput()
self.isBatch = False
self.isCalculating = False
self.updateGuiValues()


def check_q_low(self, q_value=None):
""" Validate the low q value """
Expand Down Expand Up @@ -910,8 +911,9 @@ def startNextBatchItem(self):
self.isCalculating = False
self.batchComplete = []
self.calculateAllButton.setText("Calculate All")
self.showBatchOutput()
self.enableButtons()
self.showBatchOutput()


def startThread(self):
"""
Expand Down Expand Up @@ -1177,15 +1179,16 @@ def _calculateUpdate(self, output_tuple):
self.dataPlot.slider_high_q_setter = ['check_q_high']

# Udpate internals and GUI
self.updateDataList(self._data)
self.saveToBatchResults()
self.updateDataList(self._data)
self.updateGuiValues()
if self.isBatch:
self.batchComplete.append(self.dataList.currentIndex())
self.startNextBatchItem()
else:
self.isCalculating = False
self._allowPlots = False
self.updateGuiValues()
self.saveToBatchResults()

def _threadError(self, error):
"""
Expand Down

0 comments on commit 290e51d

Please sign in to comment.