mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
River: Add default reach at study creation.
This commit is contained in:
1 parent
955af412ea
commit
28bea42b15
2 files changed
+8
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user