From 9a85a6b582ae1967af98a6b0ec17470264bc7535 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Fri, 8 Nov 2024 16:43:17 -0500 Subject: [PATCH] footprints: if changing link type fails, redirect to orientation plugin * not ideal if the plugin is either inline or a popout... in the future we could detect whether there are subsets or markers and edit the text to say they will be removed (either in one button or additional buttons as-per the orientation plugin) --- jdaviz/configs/imviz/plugins/footprints/footprints.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jdaviz/configs/imviz/plugins/footprints/footprints.py b/jdaviz/configs/imviz/plugins/footprints/footprints.py index d27f46f8c2..ad8c7ff351 100644 --- a/jdaviz/configs/imviz/plugins/footprints/footprints.py +++ b/jdaviz/configs/imviz/plugins/footprints/footprints.py @@ -197,7 +197,13 @@ def vue_link_by_wcs(self, *args): # call other plugin so that other options (wcs_fast_approximation, wcs_use_fallback) # are retained. Remove this method if support for plotting footprints # when pixel-linked is reintroduced. - self.app._jdaviz_helper.plugins['Orientation'].align_by = 'WCS' + op = self.app._jdaviz_helper.plugins['Orientation'] + try: + self.app._jdaviz_helper.plugins['Orientation'].align_by = 'WCS' + except ValueError: + # require the user to go to through the orientation plugin to + # delete subsets and change link type + op.open_in_tray() def _ensure_first_overlay(self): if not len(self._overlays):