mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
SolverParameters: Forbidden duplicate window.
This commit is contained in:
1 parent
254f0d0e8e
commit
f4a852f8f3
2 files changed
+14
-6
No files matched your search
+12
-4
@@ -540,11 +540,19 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
self.msg_select_reach()
|
||||
|
||||
def open_solver_parameters(self):
|
||||
params = SolverParametersWindow(
|
||||
study = self.model,
|
||||
parent = self
|
||||
params = self.sub_win_filter_first(
|
||||
"Solver parameters",
|
||||
contain = []
|
||||
)
|
||||
params.show()
|
||||
|
||||
if params is None:
|
||||
params = SolverParametersWindow(
|
||||
study = self.model,
|
||||
parent = self
|
||||
)
|
||||
params.show()
|
||||
else:
|
||||
params.activateWindow()
|
||||
|
||||
def run_solver(self):
|
||||
if self.model is None:
|
||||
|
||||
@@ -56,7 +56,7 @@ class SolverParametersWindow(ASubMainWindow, ListedSubWindow):
|
||||
# Init tanslate dictionary
|
||||
tr.init()
|
||||
|
||||
title = title + " - " + study.name
|
||||
self._title = title + " - " + study.name
|
||||
|
||||
super(SolverParametersWindow, self).__init__(
|
||||
name=title, ui="SolverParameters", parent=parent
|
||||
@@ -69,7 +69,7 @@ class SolverParametersWindow(ASubMainWindow, ListedSubWindow):
|
||||
self.setup_table()
|
||||
self.setup_connections()
|
||||
|
||||
self.ui.setWindowTitle(title)
|
||||
self.ui.setWindowTitle(self._title)
|
||||
|
||||
def setup_sc(self):
|
||||
self._undo_stack = {}
|
||||
|
||||
Reference in new issue
Block a user