File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed
Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ))
You can’t perform that action at this time.
0 commit comments