mirror of https://gitlab.com/pamhyr/pamhyr2
River: Add default reach at study creation.
parent
955af412ea
commit
28bea42b15
|
|
@ -372,6 +372,12 @@ class River(Graph, SQLSubModel):
|
|||
except Exception as e:
|
||||
logger_exception(e)
|
||||
|
||||
def init_default(self):
|
||||
n1 = self.add_node(880.0, 950.0)
|
||||
n2 = self.add_node(1120.0, 1020.0)
|
||||
|
||||
e = self.add_edge(n1, n2)
|
||||
|
||||
@property
|
||||
def boundary_condition(self):
|
||||
return self._boundary_condition
|
||||
|
|
|
|||
|
|
@ -89,6 +89,8 @@ class NewStudyWindow(PamhyrDialog):
|
|||
|
||||
if self._study is None:
|
||||
study = Study.new(name, description)
|
||||
study.river.init_default()
|
||||
|
||||
if self.get_radio_button("radioButton_date"):
|
||||
date = self.get_datetime_edit("dateTimeEdit_date")
|
||||
study.use_date(date)
|
||||
|
|
|
|||
Loading…
Reference in New Issue