mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Network: Fix window duplication prohibition mechanism.
This commit is contained in:
1 parent
cecbb68177
commit
dcc6e2df2d
2 files changed
+5
-3
No files matched your search
@@ -490,10 +490,12 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
Returns:
|
||||
Nothing
|
||||
"""
|
||||
if (self.model is not None and
|
||||
not self.sub_win_exists("River network")):
|
||||
if self.model is not None:
|
||||
if not self.sub_win_exists("River network"):
|
||||
self.network = NetworkWindow(model=self.model, parent=self)
|
||||
self.network.show()
|
||||
else:
|
||||
self.network.activateWindow()
|
||||
|
||||
def open_geometry(self):
|
||||
"""Open geometry window
|
||||
|
||||
@@ -50,7 +50,7 @@ class NetworkWindow(ASubMainWindow):
|
||||
self.setup_title()
|
||||
|
||||
super(NetworkWindow, self).__init__(
|
||||
name=self._title, ui="Network", parent=parent
|
||||
name=title, ui="Network", parent=parent
|
||||
)
|
||||
self.ui.setWindowTitle(self._title)
|
||||
|
||||
|
||||
Reference in new issue
Block a user