Commit 1391c6a4 authored by payno's avatar payno Committed by Henri Payno
Browse files

[gui][normalization] fix condition. `_DatasetScope` is now defined

parent 60919a7a
......@@ -717,7 +717,7 @@ class _NormIntensityDatasetWidget(qt.QWidget):
def _selectDataPath(self):
"""Open a dialog. If from a master file try to open the scan
master file if any."""
if self.getMode() == "local":
if self.getMode() is _normParams._DatasetScope.LOCAL:
if self.getScan() is not None:
scan = self.getScan()
if not isinstance(scan, HDF5TomoScan):
......@@ -740,8 +740,10 @@ class _NormIntensityDatasetWidget(qt.QWidget):
mess.setModal(False)
mess.show()
return
else:
elif self.getMode() is _normParams._DatasetScope.GLOBAL:
file_ = self.getGlobalFilePath()
else:
raise ValueError("{} is not handled".format(self.getMode()))
dialog = DataFileDialog()
dialog.selectFile(file_)
......
Supports Markdown
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