From ada396f26d7bc85846e840d5515885c9e887ee7a Mon Sep 17 00:00:00 2001 From: Theophile Terraz Date: Thu, 5 Mar 2026 16:09:16 +0100 Subject: [PATCH] debug --- src/View/MainWindow.py | 2 +- src/View/Results/CustomPlot/Plot.py | 12 +++++++----- src/View/Results/Window.py | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/View/MainWindow.py b/src/View/MainWindow.py index 405a3312..04224436 100644 --- a/src/View/MainWindow.py +++ b/src/View/MainWindow.py @@ -1741,7 +1741,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit): path = os.path.normpath(dir_path) solver_name = path.split(os.sep)[-2] solver_results = next(filter(lambda x: x.name == solver_name, - self.conf.solvers)) + self.conf.solvers), None) solver_results_adists = solver_results.results( self._study, repertory=dir_path, qlog=None) # self._output) diff --git a/src/View/Results/CustomPlot/Plot.py b/src/View/Results/CustomPlot/Plot.py index 1187e675..4ce0c815 100644 --- a/src/View/Results/CustomPlot/Plot.py +++ b/src/View/Results/CustomPlot/Plot.py @@ -133,7 +133,7 @@ class CustomPlot(PamhyrPlot): """ Get SL list for profile p at initial time (initial data) """ - t0 = min(list(self.data[self._current_res_id[0]].get("timestamps"))) + t0 = min(list(self.data[self._current_res_id].get("timestamps"))) return map( lambda p: p.get_ts_key(t0, "sl")[0], reach.profiles @@ -248,7 +248,8 @@ class CustomPlot(PamhyrPlot): e = list( map( - lambda p: max(self.get_ts_zmin(p, res_id)), + lambda p: max(self.get_ts_zmin( + p, self._current_res_id)), range(len(reach)) ) ) @@ -261,7 +262,8 @@ class CustomPlot(PamhyrPlot): e = list( map( - lambda p: min(self.get_ts_zmin(p, res_id)), + lambda p: min(self.get_ts_zmin( + p, self._current_res_id)), range(len(reach)) ) ) @@ -903,7 +905,7 @@ class CustomPlot(PamhyrPlot): z_min = profile.geometry.z_min() if self._current_res_id < 2: if reach.has_sediment(): - ts_z_min = self.get_ts_zmin(self._profile, res_id) + ts_z_min = self.get_ts_zmin(self._profile, self._current_res_id) else: ts_z_min = list( map( @@ -1138,7 +1140,7 @@ class CustomPlot(PamhyrPlot): v = profile.get_key("V") if self._current_res_id < 2: if reach.has_sediment(): - ts_z_min = self.get_ts_zmin(self._profile) + ts_z_min = self.get_ts_zmin(self._profile, self._current_res_id) else: z_min = profile.geometry.z_min() ts_z_min = list( diff --git a/src/View/Results/Window.py b/src/View/Results/Window.py index 431b3ef0..4080c1fe 100644 --- a/src/View/Results/Window.py +++ b/src/View/Results/Window.py @@ -1200,6 +1200,7 @@ class ResultsWindow(PamhyrWindow): # unselect all profiles but the first one profile_id = self._get_current_profile() self.update_table_selection_profile(profile_id) + tab_widget = self.find(QTabWidget, f"tabWidget") def import_geotiff(self): return