Commit 03eaa368 authored by Julia Garriga Ferrer's avatar Julia Garriga Ferrer
Browse files

[gui][noiseremoval/roi] Only show abort button if possible to abort

parent 15136040
......@@ -290,7 +290,8 @@ class NoiseRemovalWidget(qt.QMainWindow):
self._method = self._parametersDock.bsMethodsCB.currentText()
self._thread.setArgs(bg, self._method, self.indices, step, chunks)
self._thread.finished.connect(self._updateData)
self._parametersDock.abortBS.show()
if not self._update_dataset.in_memory:
self._parametersDock.abortBS.show()
self._thread.start()
self._setComputingState(True)
......@@ -303,7 +304,8 @@ class NoiseRemovalWidget(qt.QMainWindow):
self._thread = OperationThread(self, self._update_dataset.apply_hot_pixel_removal)
self._thread.setArgs(int(self._size), self.indices)
self._thread.finished.connect(self._updateData)
self._parametersDock.abortHP.show()
if not self._update_dataset.in_memory:
self._parametersDock.abortHP.show()
self._thread.start()
self._setComputingState(True)
......@@ -316,7 +318,8 @@ class NoiseRemovalWidget(qt.QMainWindow):
self._thread = OperationThread(self, self._update_dataset.apply_threshold_removal)
self._thread.setArgs(int(self._bottom_threshold))
self._thread.finished.connect(self._updateData)
self._parametersDock.abortTP.show()
if not self._update_dataset.in_memory:
self._parametersDock.abortTP.show()
self._thread.start()
self._setComputingState(True)
......
......@@ -174,7 +174,8 @@ class ROISelectionWidget(qt.QWidget):
and show the new data in the stack. Dataset data is not yet replaced.
A new roi is created in the middle of the new stack.
"""
self._abortB.show()
if not self._update_dataset.in_memory:
self._abortB.show()
self._applyB.setEnabled(False)
self._okB.setEnabled(False)
self.roi = RectangleROI()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment