HydraulicStructures: split correctly reach and Hydraulic Structures + display only enabled reach in tab

This commit is contained in:
Dylan Jeannin committed 2026-07-23 13:54:25 +02:00
1 parent 698e300690
commit 8e3d784e92
7 files changed
+117 -15

No files matched your search

@@ -427,6 +427,18 @@ class HydraulicStructure(SQLSubModel):
def basic_structures(self):
return self.lst.copy()
def cloned_for(self, input_reach, input_section,
output_reach, output_section):
new = HydraulicStructure(name=self._name, status=self._status)
new._enabled = self._enabled
new._input_reach = input_reach
new._input_section = input_section
new._output_reach = output_reach
new._output_section = output_section
new._data = [structure.cloned() for structure in self.lst]
new.modified()
return new
def basic_structure(self, index: int):
if len(self._data) == 0:
return None