diff --git a/glue/viewers/profile/layer_artist.py b/glue/viewers/profile/layer_artist.py index 97dd105aa..e9dbf76ac 100644 --- a/glue/viewers/profile/layer_artist.py +++ b/glue/viewers/profile/layer_artist.py @@ -41,15 +41,9 @@ def _calculate_profile(self, reset=False): self._calculate_profile_postthread() def _calculate_profile_thread(self, reset=False): - # We need to ignore any warnings that happen inside the thread - # otherwise the thread tries to send these to the glue logger (which - # uses Qt), which then results in this kind of error: - # QObject::connect: Cannot queue arguments of type 'QTextCursor' - with warnings.catch_warnings(): - warnings.simplefilter("ignore") - if reset: - self.state.reset_cache() - self.state.update_profile(update_limits=False) + if reset: + self.state.reset_cache() + self.state.update_profile(update_limits=True) def _calculate_profile_postthread(self): diff --git a/glue/viewers/profile/qt/options_widget.py b/glue/viewers/profile/qt/options_widget.py index 0c750b2c6..64a1186dc 100644 --- a/glue/viewers/profile/qt/options_widget.py +++ b/glue/viewers/profile/qt/options_widget.py @@ -54,9 +54,10 @@ def _on_function_change(self, *args): else: if self.profile_slice_helper: self.profile_slice_helper.remove() + # Has to be set to None otherwise it will re-appear for other functions + self.profile_slice_helper = None def _on_attribute_change(self, *args): - if (self.viewer_state.reference_data is None or self.viewer_state.x_att_pixel is None or self.viewer_state.x_att is self.viewer_state.x_att_pixel): @@ -64,12 +65,9 @@ def _on_attribute_change(self, *args): return if self.viewer_state.function != 'slice': - world_warning = len(dependent_axes(self.viewer_state.reference_data.coords, self.viewer_state.x_att_pixel.axis)) > 1 - self.ui.text_warning.hide() - if world_warning: self.ui.text_warning.show() self.ui.text_warning.setText(WARNING_TEXT.format(label=self.viewer_state.x_att.label))