List saved object calibrations immediately

This commit is contained in:
Ayzen
2026-10-06 19:36:00 +03:00
parent cfe81f782b
commit 4633a92144
3 changed files with 18 additions and 11 deletions
@@ -58,7 +58,7 @@ class PreprocessController:
self._capture_pause: PipelinePause | None = None
self._radar_variants: list[RadarConfigVariant] = []
self.object_calibration = ObjectCalibrationController(
parent, store, build_config, self._capture_object, self._select_object, error,
parent, store, build_config, self._capture_object, self._object_saved, error,
)
def bind_actions(self, primary: PrimaryView, data: DataView) -> None:
@@ -529,12 +529,13 @@ class PreprocessController:
provenance = capture_provenance(config.to_dict(), radar_key, through)
return ObjectSweepCapture(self._pipeline, dialog, config, self.settings().median_sweep_count, provenance)
def _select_object(self, name: str) -> None:
self.selected_sets["s21_object_calibration"] = name
self.ensure_dialog().set_set_name(name)
self._summary(self.selected_sets)
def _object_saved(self, name: str, applicable: bool) -> None:
"""List a new object calibration at once; select it only when it fits the current setup."""
if applicable:
self.selected_sets["s21_object_calibration"] = name
self.ensure_dialog().set_set_name(name)
logger.info("Selected object calibration: %s", name)
self._refresh_requested()
logger.info("Selected object calibration: %s", name)
def invalidate_object_calibration_after_geometry_change(self) -> None:
selected = self.selected_sets.get("s21_object_calibration", "")