fix(LamNI): open X-ray eye GUI widget in update_frame() if not already open #273

Merged
holler merged 1 commits from lamni_xrayeye_update_frame_gui_fix into main 2026-07-27 12:35:29 +02:00
@@ -144,6 +144,12 @@ class XrayEyeAlign:
it is hard to locate the sample between rotations. The caller
is responsible for closing the shutter afterwards.
"""
# self.gui is lamni.xeyegui, which is None until the widget has been
# opened at least once -- unlike align()/find_rotation_center(), this
# is often the first X-ray-eye call of a session (see leye_in()), so
# it must open the widget itself rather than assume it already exists.
if self.gui is None:
self.lamni.lamnigui_show_xeyealign()
if not dev.cam_xeye.live_mode_enabled.get():
dev.cam_xeye.live_mode_enabled.put(True)
self.gui.on_live_view_enabled(True)