diff --git a/MDANSE/Src/MDANSE/Framework/Configurators/QVectorsConfigurator.py b/MDANSE/Src/MDANSE/Framework/Configurators/QVectorsConfigurator.py index 888e8c70f8..5e193effef 100644 --- a/MDANSE/Src/MDANSE/Framework/Configurators/QVectorsConfigurator.py +++ b/MDANSE/Src/MDANSE/Framework/Configurators/QVectorsConfigurator.py @@ -69,7 +69,8 @@ def configure(self, value: tuple[str, dict[str, Any]]): self._original_input = value trajConfig = self.configurable[self.dependencies["trajectory"]] - self.error_status = "NONE" + self.error_status = "OK" + self.warning_status = "" try: if not isinstance(value, tuple): raise Exception(f"Q vectors setting must be a tuple {value}") diff --git a/MDANSE_GUI/Src/MDANSE_GUI/InputWidgets/QVectorsWidget.py b/MDANSE_GUI/Src/MDANSE_GUI/InputWidgets/QVectorsWidget.py index 29fac9c905..e4b5a35798 100644 --- a/MDANSE_GUI/Src/MDANSE_GUI/InputWidgets/QVectorsWidget.py +++ b/MDANSE_GUI/Src/MDANSE_GUI/InputWidgets/QVectorsWidget.py @@ -440,7 +440,6 @@ def __init__(self, *args, **kwargs): self._selector.setToolTip( "The q vectors will be generated using the method chosen here.", ) - self._model.input_is_valid.connect(self.validate_model_parameters) policy = self._view.sizePolicy() policy.setVerticalPolicy(QSizePolicy.Policy.Minimum) self._view.setSizePolicy(policy) @@ -450,14 +449,6 @@ def __init__(self, *args, **kwargs): ) self.value_changed.connect(self.preview_vectors) - @Slot(bool) - def validate_model_parameters(self, all_are_correct: bool): - """Update the widget appearance based on the input validation results.""" - if all_are_correct: - self.clear_error() - else: - self.mark_error("Some entries in the parameter table are invalid.") - @Slot() def fail_early(self): """Interrupt the vector generation process early due to initial errors.""" diff --git a/MDANSE_GUI/Src/MDANSE_GUI/Tabs/Visualisers/Action.py b/MDANSE_GUI/Src/MDANSE_GUI/Tabs/Visualisers/Action.py index eedacdd875..88306f5174 100644 --- a/MDANSE_GUI/Src/MDANSE_GUI/Tabs/Visualisers/Action.py +++ b/MDANSE_GUI/Src/MDANSE_GUI/Tabs/Visualisers/Action.py @@ -443,11 +443,11 @@ def allow_execution(self): has_warning = False for widget in self._widgets: widget.clear_error() + widget.mark_warning(widget._configurator.warning_status) + has_warning = has_warning or widget.has_warning if not widget._configurator.valid: allow = False widget.mark_error(widget._configurator.error_status, silent=True) - widget.mark_warning(widget._configurator.warning_status) - has_warning = has_warning or widget.has_warning if self.execute_button is not None: self.execute_button.setEnabled(allow) self.save_button.setEnabled(allow)