Results: Add waiting window at results reading.

This commit is contained in:
Pierre-Antoine Rouby committed 2024-02-26 16:33:45 +01:00
1 parent 8466531916
commit 76e4f4b80e
5 files changed
+238 -21

No files matched your search

+21 -10
View File
@@ -62,6 +62,7 @@ from View.SolverParameters.Window import SolverParametersWindow
from View.RunSolver.Window import SelectSolverWindow, SolverLogWindow
from View.CheckList.Window import CheckListWindow
from View.Results.Window import ResultsWindow
from View.Results.ReadingResultsDialog import ReadingResultsDialog
from View.Debug.Window import ReplWindow
# Optional internal display of documentation for make the application
@@ -966,15 +967,20 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
sol.show()
def open_solver_results(self, solver, results=None):
def reading_fn():
self._tmp_results = results
# If no specific results, get last results
if results is None:
results = self._last_results
def reading_fn():
self._tmp_results = self._last_results
if self._last_results is None:
results = solver.results(
self._study,
self._solver_workdir(solver),
)
def reading_fn():
self._tmp_results = solver.results(
self._study,
self._solver_workdir(solver),
)
# Open from file
if type(results) is str:
@@ -982,11 +988,16 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
name = os.path.basename(results).replace(".BIN", "")
results = solver.results(
self._study,
os.path.dirname(results),
name=name
)
def reading_fn():
self._tmp_results = solver.results(
self._study,
os.path.dirname(results),
name=name
)
dlg = ReadingResultsDialog(reading_fn=reading_fn, parent=self)
dlg.exec_()
results = self._tmp_results
# No results available
if results is None: