fix: no BEAMLINE BUSY overlay during Sample alignment

Same exception as the motion watch: busy in Sample alignment is the
alignment itself, and the sample motion is watched in these very
views - the curtain hid exactly what the user needed to see. Gated
at both style call sites (sample camera and the Axis views); the
session-driven 'In viewing mode' badge is unaffected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
duan_jandClaude Fable 5 authored and duan_j committed 2026-08-18 09:25:14 +02:00
1 parent 37bb25e705
commit 16b61b886b
3 files changed
+35 -5

No files matched your search

+3 -1
View File
@@ -2734,8 +2734,10 @@ class MainWindow(QMainWindow):
if hasattr(self, "gonio_camera_thread") and self.gonio_camera_thread is not None:
self.gonio_camera_thread.set_busy(s.busy)
# Sample alignment busy is the alignment itself (same exception as
# the motion watch below) — no BEAMLINE BUSY curtain on any view.
busy_style = build_busy_overlay_style(
is_busy=bool(s.busy),
is_busy=bool(s.busy) and s.state != BeamlineStateEnum.SampleAlignment,
tell_state=s.tell_state,
session_state=getattr(getattr(s, "session", None), "session", None),
)
+7 -1
View File
@@ -804,8 +804,14 @@ class SampleCameraImageLabel(QGraphicsView):
self._session_state = new_session_state
self.update()
# Same exception as the main window's motion watch: busy during
# Sample alignment IS the alignment, and the sample motion is watched
# right here — no BEAMLINE BUSY curtain over it. The "In viewing
# mode" badge is session-driven and unaffected by the gate.
new_busy_style = build_busy_overlay_style(
is_busy=bool(s.busy), tell_state=s.tell_state, session_state=self._session_state
is_busy=bool(s.busy) and s.state != BeamlineStateEnum.SampleAlignment,
tell_state=s.tell_state,
session_state=self._session_state,
)
if new_busy_style != self._busy_overlay_style:
self._busy_overlay_style = new_busy_style