From 2d21583bae5f52a367c3ea492b2b76bbf07608cc Mon Sep 17 00:00:00 2001 From: Jonathan Karlsen Date: Wed, 4 Sep 2024 09:46:18 +0200 Subject: [PATCH] Fix bug manual update step does not stop progress bar indicator --- src/ert/gui/simulation/run_dialog.py | 1 + src/ert/gui/simulation/view/progress_widget.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ert/gui/simulation/run_dialog.py b/src/ert/gui/simulation/run_dialog.py index fa003766bbd..ab53bbf28f7 100644 --- a/src/ert/gui/simulation/run_dialog.py +++ b/src/ert/gui/simulation/run_dialog.py @@ -450,6 +450,7 @@ def _on_event(self, event: object) -> None: widget.begin(event) elif isinstance(event, RunModelUpdateEndEvent): + self._progress_widget.stop_waiting_progress_bar() if (widget := self._get_update_widget(event.iteration)) is not None: widget.end(event) diff --git a/src/ert/gui/simulation/view/progress_widget.py b/src/ert/gui/simulation/view/progress_widget.py index 8fa82d2065d..ca6aeb09b1f 100644 --- a/src/ert/gui/simulation/view/progress_widget.py +++ b/src/ert/gui/simulation/view/progress_widget.py @@ -74,7 +74,7 @@ def __init__(self) -> None: def repaint_components(self) -> None: if self._realization_count > 0: full_width = self.width() - self._waiting_progress_bar.setVisible(False) + self.stop_waiting_progress_bar() for state, label in self._progress_label_map.items(): label.setVisible(True) @@ -87,6 +87,9 @@ def repaint_components(self) -> None: f" {state} ({self._status.get(state,0)}/{self._realization_count})" ) + def stop_waiting_progress_bar(self) -> None: + self._waiting_progress_bar.setVisible(False) + def update_progress(self, status: dict[str, int], realization_count: int) -> None: self._status = status self._realization_count = realization_count