Skip to content

Commit

Permalink
Merge pull request #89 from Carifio24/disable-selectable
Browse files Browse the repository at this point in the history
Create table layers as non-selectable in pywwt
  • Loading branch information
astrofrog authored Nov 8, 2022
2 parents 885c967 + 47ac835 commit 2c5b962
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions glue_wwt/viewer/table_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2c5b962

Please sign in to comment.