mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
HydraulicStructures: split correctly reach and Hydraulic Structures + display only enabled reach in tab
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user