From f743a4528b86fe866326623aad6dc3bf431b2a32 Mon Sep 17 00:00:00 2001 From: James Beilsten-Edmands <30625594+jbeilstenedmands@users.noreply.github.com> Date: Wed, 31 Jan 2024 09:53:03 +0000 Subject: [PATCH] Fix image viewer crash for still experiments introduced in #2556 --- newsfragments/XXX.bugfix | 1 + src/dials/util/image_viewer/spotfinder_frame.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 newsfragments/XXX.bugfix diff --git a/newsfragments/XXX.bugfix b/newsfragments/XXX.bugfix new file mode 100644 index 0000000000..ceef178857 --- /dev/null +++ b/newsfragments/XXX.bugfix @@ -0,0 +1 @@ +``dials.image_viewer``: Fix for stills experiments viewing crash introduced in #2556 diff --git a/src/dials/util/image_viewer/spotfinder_frame.py b/src/dials/util/image_viewer/spotfinder_frame.py index c967402218..56e7304e15 100644 --- a/src/dials/util/image_viewer/spotfinder_frame.py +++ b/src/dials/util/image_viewer/spotfinder_frame.py @@ -263,8 +263,8 @@ def __init__(self, *args, **kwds): self.viewing_stills = False break for experiment_list in self.experiments: - if any( - exp.scan and (exp.scan.get_oscillation()[1] != 0.0) + if not all( + exp.scan and (exp.scan.get_oscillation()[1] == 0.0) for exp in experiment_list ): self.viewing_still_scans = False