fix(bec_widgets): include at_each_angle_hook in the GUI's param snapshot
TomoParamsWidget/TomoQueueDialog mirror flomni.py's snapshotted-param list by hand (QUEUE_PARAM_NAMES/DEFAULTS) and it hadn't picked up the new at_each_angle_hook parameter. Left as-is, a GUI-added job's params dict would have no at_each_angle_hook key at all, so the executor's per-job setattr loop would never touch it -- silently leaving whatever hook the *previous* queued job had active in place for a job that never asked for one. Adds the key to QUEUE_PARAM_NAMES/DEFAULTS (fixes "Add current params to queue", which reads live global vars) and has add_edited_to_queue() explicitly pass the live value through (there's no editable widget for it yet, so it can't come from the form fields). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -116,6 +116,7 @@ QUEUE_PARAM_NAMES = (
|
||||
"golden_projections_at_0_deg_for_damage_estimation",
|
||||
"zero_deg_reference_at_each_subtomo",
|
||||
"corridor_size",
|
||||
"at_each_angle_hook",
|
||||
)
|
||||
|
||||
DEFAULTS: dict[str, Any] = {
|
||||
@@ -139,6 +140,7 @@ DEFAULTS: dict[str, Any] = {
|
||||
"golden_ratio_bunch_size": 20,
|
||||
"golden_max_number_of_projections": 1000.0,
|
||||
"golden_projections_at_0_deg_for_damage_estimation": 0,
|
||||
"at_each_angle_hook": None,
|
||||
}
|
||||
|
||||
|
||||
@@ -931,6 +933,13 @@ class TomoParamsWidget(BECWidget, QWidget):
|
||||
would silently ignore an in-progress edit.
|
||||
"""
|
||||
params = self._read_fields()
|
||||
# _read_fields() only covers widget-backed params (self._pw); there's
|
||||
# no editable widget for at_each_angle_hook yet, so it would
|
||||
# otherwise be silently absent from this job's params -- which would
|
||||
# make the executor leave whatever hook the *previous* queued job
|
||||
# left active in place for this one too. Pass the current live value
|
||||
# through unchanged instead of dropping it.
|
||||
params["at_each_angle_hook"] = self._gv_get("at_each_angle_hook")
|
||||
error = self._validate(params)
|
||||
if error:
|
||||
QMessageBox.warning(self, "Validation error", error)
|
||||
|
||||
Reference in New Issue
Block a user