From 1e515519dbd72698f9e55dbe38de9a45ca7f09a8 Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Tue, 10 Sep 2024 00:22:13 -0400 Subject: [PATCH] Fix galactic plane mode connection between glue and WWT. --- glue_wwt/viewer/data_viewer.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/glue_wwt/viewer/data_viewer.py b/glue_wwt/viewer/data_viewer.py index fd2fb6ea..3a85c55e 100644 --- a/glue_wwt/viewer/data_viewer.py +++ b/glue_wwt/viewer/data_viewer.py @@ -69,14 +69,17 @@ def _update_wwt(self, force=False, **kwargs): for setting in self._UPDATE_SETTINGS: if force or setting in kwargs: - wwt_attr = self._GLUE_TO_WWT_ATTR_MAP.get(setting, setting) - setattr(self._wwt, wwt_attr, getattr(self.state, setting, None)) + self._update_wwt_setting_from_state(setting) show_imagery = self.state.mode == 'Sky' if show_imagery: for setting in self._IMAGERY_UPDATE_SETTINGS: if force or setting in kwargs: - setattr(self._wwt, setting, getattr(self.state, setting, None)) + self._update_wwt_setting_from_state(setting) + + def _update_wwt_setting_from_state(self, setting): + wwt_attr = self._GLUE_TO_WWT_ATTR_MAP.get(setting, setting) + setattr(self._wwt, wwt_attr, getattr(self.state, setting, None)) def get_layer_artist(self, cls, **kwargs): "In this package, we must override to append the wwt_client argument."