@@ -475,6 +475,7 @@ def configure_panel(self) -> None:
475475 tip = _ ("Select minimum level on image" ),
476476 toolbar_id = "contrast" ,
477477 end_callback = self .apply_min_selection ,
478+ switch_to_default_tool = True ,
478479 )
479480 self .max_select_tool = self .manager .add_tool (
480481 SelectPointTool ,
@@ -484,6 +485,7 @@ def configure_panel(self) -> None:
484485 tip = _ ("Select maximum level on image" ),
485486 toolbar_id = "contrast" ,
486487 end_callback = self .apply_max_selection ,
488+ switch_to_default_tool = True ,
487489 )
488490
489491 def get_plot (self ) -> BasePlot :
@@ -544,6 +546,7 @@ def apply_min_selection(self, tool: SelectPointTool) -> None:
544546 point = self .min_select_tool .get_coordinates ()
545547 z = item .get_data (* point )
546548 self .histogram .set_min (z )
549+ tool .SIG_TOOL_JOB_FINISHED .emit ()
547550
548551 def apply_max_selection (self , tool : SelectPointTool ) -> None :
549552 """Apply maximum selection
@@ -555,6 +558,7 @@ def apply_max_selection(self, tool: SelectPointTool) -> None:
555558 point = self .max_select_tool .get_coordinates ()
556559 z = item .get_data (* point )
557560 self .histogram .set_max (z )
561+ tool .SIG_TOOL_JOB_FINISHED .emit ()
558562
559563 def set_range (self , _min : float , _max : float ) -> None :
560564 """Set contrast panel's histogram range
0 commit comments