Commit ca9184d1 authored by Thomas Vincent's avatar Thomas Vincent

update enabling of image ROI widget

parent e37d6ca4
......@@ -1212,22 +1212,18 @@ class MergeWidget(Qt.QDialog):
enable = True
prefix = merger.prefix
nTotal = len(matched_ids)
nSelected = len(selected_ids)
nNoMatch = len(no_match_ids)
nNoImg = len(no_img_ids)
# Retrieve calibration from selected ids
self.__scansGbx.setEnabled(enable)
self.__acqParamsGbx.setEnabled(len(matched_ids) > 0)
self.__acqParamsGbx.setEnabled(len(selected_ids) > 0)
self.__imageROIGbx.setEnabled(len(selected_ids) > 0)
# Set-up default values from first selected scan
if len(matched_ids) > 0:
calib = self.__merger.get_calibration(matched_ids[0])
if len(selected_ids) > 0:
calib = self.__merger.get_calibration(selected_ids[0])
if calib:
_logger.info("Load calibration information from scan %s",
matched_ids[0])
selected_ids[0])
if 'mononrj' in calib:
# Convert from keV to eV
self.__acqParamWid.beam_energy = calib['mononrj'] * 1000
......@@ -1239,10 +1235,10 @@ class MergeWidget(Qt.QDialog):
if 'cen_pix_y' in calib:
self.__acqParamWid.direct_beam_v = calib['cen_pix_y']
self.__totalScansEdit.setText(str(nTotal))
self.__selectedScansEdit.setText(str(nSelected))
self.__noMatchScansEdit.setText(str(nNoMatch))
self.__noImgInfoEdit.setText(str(nNoImg))
self.__totalScansEdit.setText(str(len(matched_ids)))
self.__selectedScansEdit.setText(str(len(selected_ids)))
self.__noMatchScansEdit.setText(str(len(no_match_ids)))
self.__noImgInfoEdit.setText(str(len(no_img_ids)))
self.__output['prefix'] = prefix
self.__prefixEdit.setText(prefix)
......
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