Skip to content

Commit

Permalink
Merge pull request #1014 from vasole/fast
Browse files Browse the repository at this point in the history
Stack Plugins compatibility with CalculationThread
  • Loading branch information
vasole committed Jun 16, 2023
2 parents 047a6ea + f1e901f commit 5803249
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 39 deletions.
32 changes: 0 additions & 32 deletions PyMca5/PyMcaPlugins/CalculationThread.py

This file was deleted.

3 changes: 1 addition & 2 deletions PyMca5/PyMcaPlugins/FastXRFLinearFitStackPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,15 @@ def _executeFunctionAndParameters(self):
self.thread = CalculationThread.CalculationThread(\
calculation_method=self.actualCalculation)
self.thread.result = self.actualCalculation()
self.threadFinished()
else:
self.thread = CalculationThread.CalculationThread(\
calculation_method=self.actualCalculation)
self.thread.finished.connect(self.threadFinished)
self.thread.start()
message = "Please wait. Calculation going on."
CalculationThread.waitingMessageDialog(self.thread,
parent=self.configurationWidget,
message=message)
self.threadFinished()

def actualCalculation(self):
activeCurve = self.getActiveCurve()
Expand Down
3 changes: 1 addition & 2 deletions PyMca5/PyMcaPlugins/StackROIBatchPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,15 @@ def _executeFunctionAndParameters(self):
self.thread = CalculationThread.CalculationThread(\
calculation_method=self.actualCalculation)
self.thread.result = self.actualCalculation()
self.threadFinished()
else:
self.thread = CalculationThread.CalculationThread(\
calculation_method=self.actualCalculation)
self.thread.finished.connect(self.threadFinished)
self.thread.start()
message = "Please wait. Calculation going on."
CalculationThread.waitingMessageDialog(self.thread,
parent=self.configurationWidget,
message=message)
self.threadFinished()

def actualCalculation(self):
activeCurve = self.getActiveCurve()
Expand Down
3 changes: 1 addition & 2 deletions PyMca5/PyMcaPlugins/XASStackBatchPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,15 @@ def _executeFunctionAndParameters(self):
self.thread = CalculationThread.CalculationThread(\
calculation_method=self.actualCalculation)
self.thread.result = self.actualCalculation()
self.threadFinished()
else:
self.thread = CalculationThread.CalculationThread(\
calculation_method=self.actualCalculation)
self.thread.finished.connect(self.threadFinished)
self.thread.start()
message = "Please wait. Calculation going on."
CalculationThread.waitingMessageDialog(self.thread,
parent=self.configurationWidget,
message=message)
self.threadFinished()

def actualCalculation(self):
activeCurve = self.getActiveCurve()
Expand Down
2 changes: 1 addition & 1 deletion PyMca5/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
__contact__ = "sole@esrf.fr"
__license__ = "MIT"
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
__version__ = "5.8.6"
__version__ = "5.8.7"

import os
import sys
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
VERSION 5.8.7
-------------

- ROI Imaging. Correct plugin threading issues introduced in version 5.8.2

VERSION 5.8.6
-------------

Expand Down

0 comments on commit 5803249

Please sign in to comment.