Sediment calibration: Skip crash compute button without data.

dev-brahim
Pierre-Antoine 2025-03-10 15:17:19 +01:00
parent 86b9f85ec6
commit 0ce60afd04
1 changed files with 5 additions and 2 deletions

View File

@ -1559,7 +1559,7 @@ class SedimentCalibrationTab(QWidget):
# Variable 'stg.sand_sample_target_indice' is set only at
# 'plot sample' button click
if len(stg.sand_sample_target_indice) == 0:
self.interpolate_data_validity_message_box()
self._data_validity_message_box()
return
data_choice = self.combobox_acoustic_data_choice\
@ -1642,7 +1642,7 @@ class SedimentCalibrationTab(QWidget):
self.plot_profile_of_concentration_fine()
def interpolate_data_validity_message_box(self):
def _data_validity_message_box(self):
msgBox = QMessageBox()
msgBox.setWindowTitle("Interpolate (step 2)")
msgBox.setIconPixmap(
@ -1911,6 +1911,9 @@ class SedimentCalibrationTab(QWidget):
axis=1))
def function_pushbutton_compute_calibration(self):
if len(stg.sand_sample_target_indice) == 0:
self._data_validity_message_box()
return
self.label_temperature.clear()
self.label_temperature.setText("T = " + str(stg.temperature) + " °C")