From 82ab7b542992e930b6e79c1ef82feaa993439c13 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr> Date: Wed, 24 Jan 2024 10:22:58 +0100 Subject: [PATCH] HS: Basic: Display set type question only if previous type is not ND. --- .../HydraulicStructures/BasicHydraulicStructures/Table.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/View/HydraulicStructures/BasicHydraulicStructures/Table.py b/src/View/HydraulicStructures/BasicHydraulicStructures/Table.py index ba5cb821..acfe2bc3 100644 --- a/src/View/HydraulicStructures/BasicHydraulicStructures/Table.py +++ b/src/View/HydraulicStructures/BasicHydraulicStructures/Table.py @@ -136,7 +136,9 @@ class TableModel(PamhyrTableModel): ) ) elif self._headers[column] == "type": - if self._question_set_type(): + old_type = self._data.basic_structure(row).type + + if old_type == "ND" or self._question_set_type(): key = next( k for k, v in self._long_types.items() if v == value -- GitLab