Skip to content

Commit

Permalink
coords-info: handle slice values not yet populated
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed May 28, 2024
1 parent 4097fd4 commit 435a80f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lcviz/plugins/coords_info/coords_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ def _image_viewer_update(self, viewer, x, y):
self.icon = 'mdi-cursor-default'
self._dict['data_label'] = ''
else:
time = viewer.slice_value
try:
time = viewer.slice_value
except IndexError:
self._viewer_mouse_clear_event(viewer)
return
# TODO: store slice unit within image viewer to avoid this assumption?
time_unit = str(self.app._jdaviz_helper.default_time_viewer._obj.time_unit)
self.row2_title = 'Time'
Expand Down

0 comments on commit 435a80f

Please sign in to comment.