Sample data: Fix #29.

dev-brahim
Pierre-Antoine 2025-03-11 11:35:52 +01:00
parent 2697acddfe
commit a5268c6214
1 changed files with 8 additions and 0 deletions

View File

@ -382,6 +382,8 @@ class SampleDataTab(QWidget):
# ------------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------------
# --- Function to fill table of values --- # --- Function to fill table of values ---
def fill_table_fine(self): def fill_table_fine(self):
self.tableWidget_fine.blockSignals(True)
if self.lineEdit_fine_sediment.text(): if self.lineEdit_fine_sediment.text():
self.row_fine = self.tableWidget_fine.setRowCount( self.row_fine = self.tableWidget_fine.setRowCount(
len(stg.depth_fine) len(stg.depth_fine)
@ -473,6 +475,8 @@ class SampleDataTab(QWidget):
self.plot_sample_position_on_transect() self.plot_sample_position_on_transect()
self.plot_total_concentration() self.plot_total_concentration()
self.plot_PSD_fine_and_sand_sediments() self.plot_PSD_fine_and_sand_sediments()
self.tableWidget_fine.blockSignals(False)
else: else:
msgBox = QMessageBox() msgBox = QMessageBox()
msgBox.setWindowTitle("Fill table Error") msgBox.setWindowTitle("Fill table Error")
@ -482,6 +486,8 @@ class SampleDataTab(QWidget):
msgBox.exec() msgBox.exec()
def fill_table_sand(self): def fill_table_sand(self):
self.tableWidget_sand.blockSignals(True)
if self.lineEdit_sand_sediment.text(): if self.lineEdit_sand_sediment.text():
self.row_sand = self.tableWidget_sand.setRowCount(len(stg.depth_sand)) 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]) 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_total_concentration()
self.plot_PSD_fine_and_sand_sediments() self.plot_PSD_fine_and_sand_sediments()
self.tableWidget_sand.blockSignals(False)
# --- Function to extract position of sample from table checkboxes to update plots --- # --- Function to extract position of sample from table checkboxes to update plots ---
def extract_position_list_and_color_list_from_table_checkboxes_fine(self): def extract_position_list_and_color_list_from_table_checkboxes_fine(self):
position = [] position = []