@@ -434,15 +434,15 @@ def __del__(self):
434434 # This happens when object has already been deleted
435435 pass
436436
437- def on_active_curve (self , x : float , y : float ) -> None :
437+ def on_active_curve (self , x : float , y : float ) -> tuple [ float , float ] :
438438 """
439439 Callback called when the active curve is moved
440440
441441 Args:
442442 x (float): the x position
443443 y (float): the y position
444444 """
445- curve : CurveItem = self .get_last_active_item (itf .ITrackableItemType )
445+ curve : CurveItem = self .get_last_active_item (itf .ICurveItemType )
446446 if curve :
447447 x , y = curve .get_closest_coordinates (x , y )
448448 return x , y
@@ -542,7 +542,7 @@ def do_pan_view(
542542 self ,
543543 dx : tuple [float , float , float , float ],
544544 dy : tuple [float , float , float , float ],
545- replot : bool = True
545+ replot : bool = True ,
546546 ) -> None :
547547 """
548548 Translate the active axes according to dx, dy axis 'state' tuples
@@ -1676,6 +1676,7 @@ def set_active_item(self, item: itf.IBasePlotItem) -> None:
16761676 self .active_item = item
16771677 if self .active_item is not None :
16781678 if not item .selected :
1679+ print (f"Selecting item { item } " )
16791680 self .select_item (self .active_item )
16801681 self ._active_xaxis = item .xAxis ()
16811682 self ._active_yaxis = item .yAxis ()
0 commit comments