From a5268c6214e68fd16d4b6a5e847d29c70a5dd2d1 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby Date: Tue, 11 Mar 2025 11:35:52 +0100 Subject: [PATCH] Sample data: Fix #29. --- View/sample_data_tab.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/View/sample_data_tab.py b/View/sample_data_tab.py index 4eec985..8e42dd0 100644 --- a/View/sample_data_tab.py +++ b/View/sample_data_tab.py @@ -382,6 +382,8 @@ class SampleDataTab(QWidget): # ------------------------------------------------------------------------------------------------------------------ # --- Function to fill table of values --- def fill_table_fine(self): + self.tableWidget_fine.blockSignals(True) + if self.lineEdit_fine_sediment.text(): self.row_fine = self.tableWidget_fine.setRowCount( len(stg.depth_fine) @@ -473,6 +475,8 @@ class SampleDataTab(QWidget): self.plot_sample_position_on_transect() self.plot_total_concentration() self.plot_PSD_fine_and_sand_sediments() + + self.tableWidget_fine.blockSignals(False) else: msgBox = QMessageBox() msgBox.setWindowTitle("Fill table Error") @@ -482,6 +486,8 @@ class SampleDataTab(QWidget): msgBox.exec() def fill_table_sand(self): + self.tableWidget_sand.blockSignals(True) + if self.lineEdit_sand_sediment.text(): self.row_sand = self.tableWidget_sand.setRowCount(len(stg.depth_sand)) self.column_sand = self.tableWidget_sand.setColumnCount(6 + stg.radius_grain_sand.shape[0]) @@ -572,6 +578,8 @@ class SampleDataTab(QWidget): self.plot_total_concentration() self.plot_PSD_fine_and_sand_sediments() + self.tableWidget_sand.blockSignals(False) + # --- Function to extract position of sample from table checkboxes to update plots --- def extract_position_list_and_color_list_from_table_checkboxes_fine(self): position = []