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):
|
def open_initial_conditions(self):
|
||||||
if self.model.river.has_current_reach():
|
if self.model.river.has_current_reach():
|
||||||
initial = InitialConditionsWindow(
|
initial = self.sub_win_filter_first(
|
||||||
study = self.model,
|
"Initial condition",
|
||||||
parent = self
|
contain = [self.model.river.current_reach().name]
|
||||||
)
|
)
|
||||||
initial.show()
|
|
||||||
|
if initial is None:
|
||||||
|
initial = InitialConditionsWindow(
|
||||||
|
study = self.model,
|
||||||
|
parent = self
|
||||||
|
)
|
||||||
|
initial.show()
|
||||||
|
else:
|
||||||
|
initial.activateWindow()
|
||||||
else:
|
else:
|
||||||
self.msg_select_reach()
|
self.msg_select_reach()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue