Error message is added when user click on import/compute calibration without acoustic data #37
parent
22be597d75
commit
22cd451b24
|
|
@ -1716,6 +1716,21 @@ class SedimentCalibrationTab(QWidget):
|
|||
self.animaiton_groupbox_compute.start()
|
||||
|
||||
def import_calibration_file(self):
|
||||
|
||||
if self.combobox_acoustic_data_choice.count() == 0:
|
||||
msgBox = QMessageBox()
|
||||
msgBox.setWindowTitle("Calibration import error")
|
||||
msgBox.setIconPixmap(
|
||||
QPixmap(
|
||||
self._path_icon("no_approved.png")
|
||||
).scaledToHeight(32, Qt.SmoothTransformation)
|
||||
)
|
||||
msgBox.setText("Update data before importing calibration")
|
||||
msgBox.setStandardButtons(QMessageBox.Ok)
|
||||
msgBox.exec()
|
||||
|
||||
else:
|
||||
|
||||
filename = QFileDialog.getOpenFileName(
|
||||
self, "Open calibration",
|
||||
[
|
||||
|
|
@ -1784,19 +1799,8 @@ class SedimentCalibrationTab(QWidget):
|
|||
)
|
||||
|
||||
def read_calibration_file_and_fill_parameter(self):
|
||||
if self.combobox_acoustic_data_choice.count() == 0:
|
||||
msgBox = QMessageBox()
|
||||
msgBox.setWindowTitle("Calibration import error")
|
||||
msgBox.setIconPixmap(
|
||||
QPixmap(
|
||||
self._path_icon("no_approved.png")
|
||||
).scaledToHeight(32, Qt.SmoothTransformation)
|
||||
)
|
||||
msgBox.setText("Update data before importing calibration")
|
||||
msgBox.setStandardButtons(QMessageBox.Ok)
|
||||
msgBox.exec()
|
||||
|
||||
elif stg.filename_calibration_file == "":
|
||||
if stg.filename_calibration_file == "":
|
||||
|
||||
pass
|
||||
|
||||
|
|
@ -1996,6 +2000,20 @@ class SedimentCalibrationTab(QWidget):
|
|||
|
||||
def function_pushbutton_compute_calibration(self):
|
||||
|
||||
if self.combobox_acoustic_data_choice.count() == 0:
|
||||
msgBox = QMessageBox()
|
||||
msgBox.setWindowTitle("Calibration computation error")
|
||||
msgBox.setIconPixmap(
|
||||
QPixmap(
|
||||
self._path_icon("no_approved.png")
|
||||
).scaledToHeight(32, Qt.SmoothTransformation)
|
||||
)
|
||||
msgBox.setText("Update data before importing calibration")
|
||||
msgBox.setStandardButtons(QMessageBox.Ok)
|
||||
msgBox.exec()
|
||||
|
||||
else:
|
||||
|
||||
self.label_temperature.clear()
|
||||
self.label_temperature.setText("T = " + str(stg.temperature) + " °C")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue