From 3c787771792c13467e1838288c6bc89b88d052e6 Mon Sep 17 00:00:00 2001 From: brahim Date: Thu, 13 Mar 2025 13:34:57 +0100 Subject: [PATCH] Correction of reload button (if no acoustic data) #33 --- View/signal_processing_tab.py | 38 +++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/View/signal_processing_tab.py b/View/signal_processing_tab.py index 95288ab..665c742 100644 --- a/View/signal_processing_tab.py +++ b/View/signal_processing_tab.py @@ -447,8 +447,8 @@ class SignalProcessingTab(QWidget): # -------------------------------------------------------------------------------------------------------------- self.pushbutton_update.clicked.connect(self.update_SignalPreprocessingTab) - self.pushbutton_update.clicked.connect(self.compute_average_profile_tail) - self.pushbutton_update.clicked.connect(self.plot_averaged_profile_tail) + # self.pushbutton_update.clicked.connect(self.compute_average_profile_tail) + # self.pushbutton_update.clicked.connect(self.plot_averaged_profile_tail) self.combobox_acoustic_data_choice.currentIndexChanged.connect(self.combobox_acoustic_data_choice_change_index) @@ -501,26 +501,34 @@ class SignalProcessingTab(QWidget): - the user remove a file (in the list widget) in the first tab (Acoustic data), so that the combobox of data to be processed is updated, - the user change the limits of one or all the records in the first tab (Acoustic data) """ + if len(stg.filename_BS_raw_data) == 0: - self.combobox_acoustic_data_choice.clear() - self.combobox_acoustic_data_choice.addItems(stg.filename_BS_raw_data) + pass - if stg.noise_method[self.combobox_acoustic_data_choice.currentIndex()] == 0: + else: - self.groupbox_download_noise_file.setChecked(True) - self.groupbox_compute_noise_from_profile_tail.setChecked(False) - self.groupbox_download_noise_file_toggle() + self.combobox_acoustic_data_choice.clear() + self.combobox_acoustic_data_choice.addItems(stg.filename_BS_raw_data) - elif stg.noise_method[self.combobox_acoustic_data_choice.currentIndex()] == 1: + if stg.noise_method[self.combobox_acoustic_data_choice.currentIndex()] == 0: - self.groupbox_download_noise_file.setChecked(False) - self.groupbox_compute_noise_from_profile_tail.setChecked(True) - self.groupbox_option_profile_tail_toggle() + self.groupbox_download_noise_file.setChecked(True) + self.groupbox_compute_noise_from_profile_tail.setChecked(False) + self.groupbox_download_noise_file_toggle() - self.combobox_freq_noise_from_profile_tail.clear() - self.combobox_freq_noise_from_profile_tail.addItems(stg.freq_text[self.combobox_acoustic_data_choice.currentIndex()]) + elif stg.noise_method[self.combobox_acoustic_data_choice.currentIndex()] == 1: - self.combobox_acoustic_data_choice.currentIndexChanged.connect(self.combobox_acoustic_data_choice_change_index) + self.groupbox_download_noise_file.setChecked(False) + self.groupbox_compute_noise_from_profile_tail.setChecked(True) + self.groupbox_option_profile_tail_toggle() + + self.combobox_freq_noise_from_profile_tail.clear() + self.combobox_freq_noise_from_profile_tail.addItems(stg.freq_text[self.combobox_acoustic_data_choice.currentIndex()]) + + self.combobox_acoustic_data_choice.currentIndexChanged.connect(self.combobox_acoustic_data_choice_change_index) + + self.compute_average_profile_tail() + self.plot_averaged_profile_tail() def activate_list_of_pre_processed_data(self): for i in range(self.combobox_acoustic_data_choice.count()):