Skip to content

Commit

Permalink
Allow _reference_data_changed call to be forced
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Jan 30, 2023
1 parent dda1dc0 commit 8a9d7c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions glue/viewers/image/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ def reset_limits(self):
def _display_world(self):
return getattr(self.reference_data, 'coords', None) is not None

def _reference_data_changed(self, *args):
def _reference_data_changed(self, *args, force=False):
# This signal can get emitted if just the choices but not the actual
# reference data change, so we check here that the reference data has
# actually changed
if self.reference_data is not getattr(self, '_last_reference_data', None):
if self.reference_data is not getattr(self, '_last_reference_data', None) or force:
self._last_reference_data = self.reference_data
# Note that we deliberately use nested delay_callback here, because
# we want to make sure that x_att_world and y_att_world both get
Expand Down

0 comments on commit 8a9d7c8

Please sign in to comment.