mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Ensemble: Results: Add method to open ensemble results window.
This commit is contained in:
1 parent
c40e28ed0f
commit
ef36eba039
4 files changed
+30
-1
No files matched your search
@@ -1696,6 +1696,12 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
if not self.msg_box_results_continue():
|
||||
return
|
||||
|
||||
if self._study.status.scenario.is_ensemble():
|
||||
self.open_solver_ens_results_window(solver, results)
|
||||
else:
|
||||
self.open_solver_results_window(solver, results)
|
||||
|
||||
def open_solver_results_window(self, solver, results):
|
||||
# Windows already opened
|
||||
if self.sub_window_exists(
|
||||
ResultsWindow,
|
||||
@@ -1715,6 +1721,26 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
)
|
||||
res.show()
|
||||
|
||||
def open_solver_ens_results_window(self, solver, results):
|
||||
# Windows already opened
|
||||
if self.sub_window_exists(
|
||||
ResultsEnsembleWindow,
|
||||
data=[
|
||||
self._study,
|
||||
None, # No config,
|
||||
results._solver,
|
||||
results._repertory,
|
||||
results._name]
|
||||
):
|
||||
return
|
||||
|
||||
res = ResultsEnsembleWindow(
|
||||
study=self._study,
|
||||
results=[results],
|
||||
parent=self
|
||||
)
|
||||
res.show()
|
||||
|
||||
def msg_open_results_no_results(self):
|
||||
self.message_box(
|
||||
window_title=self._trad["Warning"],
|
||||
|
||||
@@ -1638,6 +1638,7 @@ class ResultsEnsembleWindow(ResultsWindow):
|
||||
# unselect all profiles but the first one
|
||||
profile_id = self._get_current_profile()
|
||||
self.update_table_selection_profile(profile_id)
|
||||
|
||||
tab_widget = self.find(QTabWidget, f"tabWidget")
|
||||
tab_index = tab_widget.currentIndex()
|
||||
name = tab_widget.tabText(tab_index)
|
||||
|
||||
Reference in new issue
Block a user