mirror of https://gitlab.com/pamhyr/pamhyr2
View: Fix results window open.
parent
f5fdde9a5d
commit
4d1eb0fecc
|
|
@ -793,12 +793,17 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||||
return
|
return
|
||||||
|
|
||||||
# Windows already opened
|
# Windows already opened
|
||||||
res = self.sub_win_filter_first(
|
if self._sub_window_exists(
|
||||||
"Results",
|
ResultsWindow,
|
||||||
contain=[solver.name, results.date]
|
data=[
|
||||||
)
|
self._study,
|
||||||
|
None, # No config
|
||||||
|
solver,
|
||||||
|
results
|
||||||
|
]
|
||||||
|
):
|
||||||
|
return
|
||||||
|
|
||||||
if res is None:
|
|
||||||
res = ResultsWindow(
|
res = ResultsWindow(
|
||||||
study=self._study,
|
study=self._study,
|
||||||
solver=solver,
|
solver=solver,
|
||||||
|
|
@ -806,8 +811,6 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||||
parent=self
|
parent=self
|
||||||
)
|
)
|
||||||
res.show()
|
res.show()
|
||||||
else:
|
|
||||||
res.activateWindow()
|
|
||||||
|
|
||||||
def open_last_results(self):
|
def open_last_results(self):
|
||||||
if self._last_solver is None or self._last_results is None:
|
if self._last_solver is None or self._last_results is None:
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,9 @@ class ResultsWindow(PamhyrWindow):
|
||||||
parent=parent
|
parent=parent
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self._hash_data.append(self._solver)
|
||||||
|
self._hash_data.append(self._results)
|
||||||
|
|
||||||
self._additional_plot = {}
|
self._additional_plot = {}
|
||||||
|
|
||||||
self.setup_table()
|
self.setup_table()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue