mirror of https://gitlab.com/pamhyr/pamhyr2
InitialConditions: Forbidden duplicate window.
parent
f4a852f8f3
commit
06b6d59494
|
|
@ -531,11 +531,19 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
|
||||
def open_initial_conditions(self):
|
||||
if self.model.river.has_current_reach():
|
||||
initial = self.sub_win_filter_first(
|
||||
"Initial condition",
|
||||
contain = [self.model.river.current_reach().name]
|
||||
)
|
||||
|
||||
if initial is None:
|
||||
initial = InitialConditionsWindow(
|
||||
study = self.model,
|
||||
parent = self
|
||||
)
|
||||
initial.show()
|
||||
else:
|
||||
initial.activateWindow()
|
||||
else:
|
||||
self.msg_select_reach()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue