From 47ac835f07b2b4e9bbecfe9848f89760a333d6dd Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Sat, 20 Aug 2022 16:33:13 -0400 Subject: [PATCH] Create new layers as non-selectable, if pywwt version supports selection. --- glue_wwt/viewer/table_layer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/glue_wwt/viewer/table_layer.py b/glue_wwt/viewer/table_layer.py index 4e55bc36..faea5783 100644 --- a/glue_wwt/viewer/table_layer.py +++ b/glue_wwt/viewer/table_layer.py @@ -20,6 +20,7 @@ from astropy.table import Table import pywwt +from pywwt.layers import TableLayer from distutils.version import LooseVersion PYWWT_LT_06 = LooseVersion(pywwt.__version__) < '0.6' @@ -325,6 +326,9 @@ def _update_presentation(self, force=False, **kwargs): if lon_orig is not None: tab['lon_orig'] = lon_orig * u.degree + if 'selectable' in TableLayer.class_trait_names(): + data_kwargs['selectable'] = False + self.wwt_layer = self.wwt_client.layers.add_table_layer(tab, frame=ref_frame, lon_att='lon', lat_att='lat', **data_kwargs)