Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
9 changes: 0 additions & 9 deletions MDANSE_GUI/Src/MDANSE_GUI/InputWidgets/QVectorsWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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."""
Expand Down
4 changes: 2 additions & 2 deletions MDANSE_GUI/Src/MDANSE_GUI/Tabs/Visualisers/Action.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading