Commit 28bea42b authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

River: Add default reach at study creation.

Showing with 8 additions and 0 deletions
+8 -0
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment