mirror of https://gitlab.com/pamhyr/pamhyr2
MainWindow: Display message when there are no current reach.
parent
b1ea642f1c
commit
4ed1aef4a5
|
|
@ -289,6 +289,11 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
# SUBWINDOW #
|
||||
#############
|
||||
|
||||
def msg_select_reach(self):
|
||||
self.message_box("Please select a reach",
|
||||
"Geometry edition need a reach selected "
|
||||
"into river network window to work on it")
|
||||
|
||||
def open_configure(self):
|
||||
"""Open configure window
|
||||
|
||||
|
|
@ -371,9 +376,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
geometry = GeometryWindow(model=self.model, parent=self)
|
||||
geometry.show()
|
||||
else:
|
||||
self.message_box("Please select a reach",
|
||||
"Geometry edition need a reach selected "
|
||||
"into river network window to work on it")
|
||||
self.msg_select_reach()
|
||||
|
||||
def open_boundary_cond(self):
|
||||
bound = BoundaryConditionWindow(study = self.model, parent = self)
|
||||
|
|
@ -392,11 +395,15 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
strick.show()
|
||||
|
||||
def open_sections(self):
|
||||
sections = SectionsWindow(
|
||||
study = self.model,
|
||||
parent = self
|
||||
)
|
||||
sections.show()
|
||||
if (self.model is not None and
|
||||
self.model.river.has_current_reach()):
|
||||
sections = SectionsWindow(
|
||||
study = self.model,
|
||||
parent = self
|
||||
)
|
||||
sections.show()
|
||||
else:
|
||||
self.msg_select_reach()
|
||||
|
||||
def open_initial_conditions(self):
|
||||
if self.model.river.has_current_reach():
|
||||
|
|
@ -405,6 +412,8 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
parent = self
|
||||
)
|
||||
initial.show()
|
||||
else:
|
||||
self.msg_select_reach()
|
||||
|
||||
def open_solver_parameters(self):
|
||||
params = SolverParametersWindow(
|
||||
|
|
|
|||
Loading…
Reference in New Issue