Skip to content

Commit 5267763

Browse files
author
Nabil Freij
committed
Fix issue with sliders appearing again
1 parent f84b919 commit 5267763

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

glue/viewers/profile/layer_artist.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,9 @@ def _calculate_profile(self, reset=False):
4141
self._calculate_profile_postthread()
4242

4343
def _calculate_profile_thread(self, reset=False):
44-
# We need to ignore any warnings that happen inside the thread
45-
# otherwise the thread tries to send these to the glue logger (which
46-
# uses Qt), which then results in this kind of error:
47-
# QObject::connect: Cannot queue arguments of type 'QTextCursor'
48-
with warnings.catch_warnings():
49-
warnings.simplefilter("ignore")
50-
if reset:
51-
self.state.reset_cache()
52-
self.state.update_profile(update_limits=False)
44+
if reset:
45+
self.state.reset_cache()
46+
self.state.update_profile(update_limits=True)
5347

5448
def _calculate_profile_postthread(self):
5549

glue/viewers/profile/qt/options_widget.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,20 @@ def _on_function_change(self, *args):
5454
else:
5555
if self.profile_slice_helper:
5656
self.profile_slice_helper.remove()
57+
# Has to be set to None otherwise it will re-appear for other functions
58+
self.profile_slice_helper = None
5759

5860
def _on_attribute_change(self, *args):
59-
6061
if (self.viewer_state.reference_data is None or
6162
self.viewer_state.x_att_pixel is None or
6263
self.viewer_state.x_att is self.viewer_state.x_att_pixel):
6364
self.ui.text_warning.hide()
6465
return
6566

6667
if self.viewer_state.function != 'slice':
67-
6868
world_warning = len(dependent_axes(self.viewer_state.reference_data.coords,
6969
self.viewer_state.x_att_pixel.axis)) > 1
70-
7170
self.ui.text_warning.hide()
72-
7371
if world_warning:
7472
self.ui.text_warning.show()
7573
self.ui.text_warning.setText(WARNING_TEXT.format(label=self.viewer_state.x_att.label))

0 commit comments

Comments
 (0)