Skip to content

Commit

Permalink
get_object -> get_component, 2 returns to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
gibsongreen committed Jul 30, 2024
1 parent d6c6933 commit 196659b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ def __init__(self, *args, **kwargs):
@property
def user_api(self):
if self.app.config == 'cubeviz':
return PluginUserApi(self, expose=('spectral_unit', 'flux_or_sb', 'flux_unit', 'angle_unit')) # noqa
expose = ('spectral_unit', 'flux_or_sb', 'flux_unit', 'angle_unit')
else:
return PluginUserApi(self, expose=('spectral_unit', 'flux_unit', 'angle_unit'))
expose = ('spectral_unit', 'flux_unit', 'angle_unit')
return PluginUserApi(self, expose=expose)

def _on_glue_x_display_unit_changed(self, x_unit):
if x_unit is None:
Expand Down Expand Up @@ -176,7 +177,7 @@ def _on_glue_y_display_unit_changed(self, y_unit):

# sets the angle unit drop down and the surface brightness read-only text
if self.app.data_collection[0]:
dc_unit = self.app.data_collection[0].get_object().flux.unit
dc_unit = self.app.data_collection[0].get_component("flux").units
self.angle_unit.choices = create_angle_equivalencies_list(dc_unit)
self.angle_unit.selected = self.angle_unit.choices[0]
self.sb_unit = self._append_angle_correctly(
Expand Down

0 comments on commit 196659b

Please sign in to comment.