From 578a997738fa04b2621f31a8effd3acd8e2da2fc Mon Sep 17 00:00:00 2001 From: Edan Bainglass Date: Mon, 11 Nov 2024 08:03:44 +0000 Subject: [PATCH] Update results section controls layout on process change --- src/aiidalab_qe/app/result/__init__.py | 3 +++ tests/test_result.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/aiidalab_qe/app/result/__init__.py b/src/aiidalab_qe/app/result/__init__.py index 8c46a1e2..b9f5b156 100644 --- a/src/aiidalab_qe/app/result/__init__.py +++ b/src/aiidalab_qe/app/result/__init__.py @@ -234,3 +234,6 @@ def _update_state(self): elif process_node.is_finished_ok: self.state = self.State.SUCCESS self._model.process_info = PROCESS_COMPLETED + if self.state in (self.State.SUCCESS, self.State.FAIL): + self._update_kill_button_layout() + self._update_clean_scratch_button_layout() diff --git a/tests/test_result.py b/tests/test_result.py index be25725a..52e142ff 100644 --- a/tests/test_result.py +++ b/tests/test_result.py @@ -3,7 +3,7 @@ from bs4 import BeautifulSoup from aiidalab_qe.app.main import App -from aiidalab_qe.app.result.summary import WorkChainSummary, WorkChainSummaryModel +from aiidalab_qe.app.result.summary import WorkChainSummaryModel from aiidalab_qe.app.result.viewer import WorkChainViewer