mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
InitialConditions: Forbidden duplicate window.
This commit is contained in:
1 parent
f4a852f8f3
commit
06b6d59494
1 file changed
+12
-4
+12
-4
@@ -531,11 +531,19 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
|
||||
def open_initial_conditions(self):
|
||||
if self.model.river.has_current_reach():
|
||||
initial = InitialConditionsWindow(
|
||||
study = self.model,
|
||||
parent = self
|
||||
initial = self.sub_win_filter_first(
|
||||
"Initial condition",
|
||||
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:
|
||||
self.msg_select_reach()
|
||||
|
||||
|
||||
Reference in new issue
Block a user