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
@@ -49,11 +49,11 @@ class ObjectCalibrationController(QObject):
"""Own one modeless editor, acquisition job and cancellable calculation."""
def __init__(self, parent: QWidget, store: NpzStore, build_config: Callable[[], RunConfigModel],
capture: Callable[[ObjectCalibrationDialog], ObjectSweepCapture], select_saved: Callable[[str], None],
capture: Callable[[ObjectCalibrationDialog], ObjectSweepCapture], saved: Callable[[str, bool], None],
error: Callable[[str, Exception], None]) -> None:
super().__init__(parent)
self._parent, self._store, self._build_config = parent, store, build_config
self._start_capture, self._select_saved, self._error = capture, select_saved, error
self._start_capture, self._saved, self._error = capture, saved, error
self.dialog: ObjectCalibrationDialog | None = None
self.capture: ObjectSweepCapture | None = None
self._closed = False
@@ -157,8 +157,9 @@ class ObjectCalibrationController(QObject):
validate_object_set(collection, metadata, current.to_dict(), current_key, through)
except Exception as exc:
status += f" Not selected for the current configuration: {exc}"
self._saved(self._save_name, False)
else:
self._select_saved(self._save_name)
self._saved(self._save_name, True)
status += " Applies on the next Start."
self.dialog.set_status(status)
logger.info("%s", status)