From a05a9b5ca28199f98d52e34e5847e684b2bc31a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Fri, 19 Jan 2024 04:06:20 +0000 Subject: [PATCH] Move preserve pan --- src/lvmopstools/ds9.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lvmopstools/ds9.py b/src/lvmopstools/ds9.py index e23b101..f80e974 100644 --- a/src/lvmopstools/ds9.py +++ b/src/lvmopstools/ds9.py @@ -141,13 +141,14 @@ def ds9_display_frames( if cam in files_dict: ds9.set(f"frame {nframe}") - ds9.set("preserve pan yes") - ds9.set("preserve regions yes") - ds9.set("preserve scale yes") - has_file = ds9.get("file") != "" zoom = ds9.get("zoom") + if has_file: + ds9.set("preserve pan yes") + ds9.set("preserve regions yes") + ds9.set("preserve scale yes") + file_ = files_dict[cam] if file_ is None: continue