From 5b7f068e0e04fd679d1743bb1bbfb1909c80cced Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Wed, 20 Mar 2024 13:14:07 -0400 Subject: [PATCH] disable matched zoom in other viewers in imviz to avoid recursion --- CHANGES.rst | 3 +++ jdaviz/configs/imviz/plugins/tools.py | 2 +- jdaviz/core/tools.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index dbef89a248..04e0b0e3f3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -47,6 +47,9 @@ Imviz - Add "Random" colormap for visualizing image segmentation maps. [#2671] +- Enabling any matched zoom tool in a viewer disables other matched zoom tools in other viewers + to avoid recursion. [#2764] + Mosviz ^^^^^^ diff --git a/jdaviz/configs/imviz/plugins/tools.py b/jdaviz/configs/imviz/plugins/tools.py index 44121d477a..5f4ada2cf4 100644 --- a/jdaviz/configs/imviz/plugins/tools.py +++ b/jdaviz/configs/imviz/plugins/tools.py @@ -17,7 +17,7 @@ class _ImvizMatchedZoomMixin(_MatchedZoomMixin): match_keys = ('x_min', 'x_max', 'y_min', 'y_max') - disable_matched_zoom_in_other_viewer = False + disable_matched_zoom_in_other_viewer = True def _is_matched_viewer(self, viewer): return isinstance(viewer, BqplotImageView) diff --git a/jdaviz/core/tools.py b/jdaviz/core/tools.py index 173fb8f1f3..10c05dd566 100644 --- a/jdaviz/core/tools.py +++ b/jdaviz/core/tools.py @@ -43,7 +43,7 @@ def save_prev_zoom(self): class _MatchedZoomMixin: match_axes = ('x', 'y') - disable_matched_zoom_in_other_viewer = False + disable_matched_zoom_in_other_viewer = True def _is_matched_viewer(self, viewer): return True