mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Friction: Forbidden duplicate window.
This commit is contained in:
1 parent
94a0a96659
commit
254f0d0e8e
3 files changed
+42
-17
No files matched your search
+26
-9
@@ -494,21 +494,38 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
lateral.activateWindow()
|
||||
|
||||
def open_stricklers(self):
|
||||
strick = StricklersWindow(
|
||||
study = self.model,
|
||||
config = self.conf,
|
||||
parent = self
|
||||
strick = self.sub_win_filter_first(
|
||||
"Stricklers",
|
||||
contain = []
|
||||
)
|
||||
strick.show()
|
||||
|
||||
if strick is None:
|
||||
strick = StricklersWindow(
|
||||
study = self.model,
|
||||
config = self.conf,
|
||||
parent = self
|
||||
)
|
||||
strick.show()
|
||||
else:
|
||||
strick.activateWindow()
|
||||
|
||||
def open_frictions(self):
|
||||
if (self.model is not None and
|
||||
self.model.river.has_current_reach()):
|
||||
frictions = FrictionsWindow(
|
||||
study = self.model,
|
||||
parent = self
|
||||
|
||||
frictions = self.sub_win_filter_first(
|
||||
"Frictions",
|
||||
contain = [self.model.river.current_reach().name]
|
||||
)
|
||||
frictions.show()
|
||||
|
||||
if frictions is None:
|
||||
frictions = FrictionsWindow(
|
||||
study = self.model,
|
||||
parent = self
|
||||
)
|
||||
frictions.show()
|
||||
else:
|
||||
frictions.activateWindow()
|
||||
else:
|
||||
self.msg_select_reach()
|
||||
|
||||
|
||||
Reference in new issue
Block a user