@ -420,6 +420,9 @@ void UBGraphicsRuler::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
UBStylusTool : : Enum currentTool = ( UBStylusTool : : Enum ) UBDrawingController : : drawingController ( ) - > stylusTool ( ) ;
if ( UBDrawingController : : drawingController ( ) - > mActiveRuler = = nullptr )
UBDrawingController : : drawingController ( ) - > mActiveRuler = this ;
if ( currentTool = = UBStylusTool : : Selector | |
currentTool = = UBStylusTool : : Play )
{
@ -450,7 +453,6 @@ void UBGraphicsRuler::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
else if ( UBDrawingController : : drawingController ( ) - > isDrawingTool ( ) )
{
setCursor ( drawRulerLineCursor ( ) ) ;
UBDrawingController : : drawingController ( ) - > mActiveRuler = this ;
event - > accept ( ) ;
}
}
@ -462,7 +464,7 @@ void UBGraphicsRuler::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
mCloseSvgItem - > setVisible ( mShowButtons ) ;
mResizeSvgItem - > setVisible ( mShowButtons ) ;
mRotateSvgItem - > setVisible ( mShowButtons ) ;
UBDrawingController : : drawingController ( ) - > mActiveRuler = NULL ;
UBDrawingController : : drawingController ( ) - > mActiveRuler = nullptr ;
event - > accept ( ) ;
update ( ) ;
}