Skip to content

Commit

Permalink
fix for wcs-only layers appearing in plot options
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Jan 23, 2024
1 parent beff6b7 commit 414b632
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions jdaviz/configs/default/plugins/plot_options/plot_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,12 @@ def __init__(self, *args, **kwargs):
self.layer = LayerSelect(self, 'layer_items', 'layer_selected',
'viewer_selected', 'layer_multiselect')

def is_not_wcs_only(layer):
# exclude WCS-only layers from the layer choices:
return not getattr(layer.layer, 'meta', {}).get(self.app._wcs_only_label, False)

self.layer.filters += [is_not_wcs_only]

self.swatches_palette = [
['#FF0000', '#AA0000', '#550000'],
['#FFD300', '#AAAA00', '#555500'],
Expand Down

0 comments on commit 414b632

Please sign in to comment.