From 4a8b318ea46ff09777f35e501381664906fe1a50 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby Date: Mon, 28 Apr 2025 17:59:21 +0200 Subject: [PATCH] Sediment calibration: Fix FCB computation without values. --- View/sediment_calibration_tab.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/View/sediment_calibration_tab.py b/View/sediment_calibration_tab.py index 63adf79..a313ef8 100644 --- a/View/sediment_calibration_tab.py +++ b/View/sediment_calibration_tab.py @@ -2414,6 +2414,10 @@ class SedimentCalibrationTab(QWidget): data_id = self.combobox_acoustic_data_choice.currentIndex() fcb_id = self.combobox_frequency_FCB.currentIndex() + if (self.lineEdit_FCB_from.text() == '' + or self.lineEdit_FCB_to.text() == ''): + return + self.update_plot_FCB() if stg.FCB.shape == (0,): @@ -2437,8 +2441,7 @@ class SedimentCalibrationTab(QWidget): np.round( np.abs( x - float( - self.lineEdit_FCB_from\ - .text().replace(',','.') + self.lineEdit_FCB_from.text().replace(',','.') ) ), 2 ) == np.min(