mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
View: Fix results window open.
This commit is contained in:
1 parent
f5fdde9a5d
commit
4d1eb0fecc
2 files changed
+13
-7
No files matched your search
+10
-7
@@ -793,12 +793,17 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
return
|
||||
|
||||
# Windows already opened
|
||||
res = self.sub_win_filter_first(
|
||||
"Results",
|
||||
contain=[solver.name, results.date]
|
||||
)
|
||||
if self._sub_window_exists(
|
||||
ResultsWindow,
|
||||
data=[
|
||||
self._study,
|
||||
None, # No config
|
||||
solver,
|
||||
results
|
||||
]
|
||||
):
|
||||
return
|
||||
|
||||
if res is None:
|
||||
res = ResultsWindow(
|
||||
study=self._study,
|
||||
solver=solver,
|
||||
@@ -806,8 +811,6 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
parent=self
|
||||
)
|
||||
res.show()
|
||||
else:
|
||||
res.activateWindow()
|
||||
|
||||
def open_last_results(self):
|
||||
if self._last_solver is None or self._last_results is None:
|
||||
|
||||
@@ -91,6 +91,9 @@ class ResultsWindow(PamhyrWindow):
|
||||
parent=parent
|
||||
)
|
||||
|
||||
self._hash_data.append(self._solver)
|
||||
self._hash_data.append(self._results)
|
||||
|
||||
self._additional_plot = {}
|
||||
|
||||
self.setup_table()
|
||||
|
||||
Reference in new issue
Block a user