Commit 323ae3eb authored by Ludovic Fauvet's avatar Ludovic Fauvet

Change mouse cursor when hovering a resize zone on an audio clip too.

parent 4a1e8941
......@@ -188,6 +188,19 @@ void GraphicsAudioItem::hoverLeaveEvent( QGraphicsSceneHoverEvent* event )
AbstractGraphicsMediaItem::hoverLeaveEvent( event );
}
void GraphicsAudioItem::hoverMoveEvent( QGraphicsSceneHoverEvent* event )
{
if ( !tracksView() ) return;
if ( tracksView()->tool() == TOOL_DEFAULT )
{
if ( resizeZone( event->pos() ) )
setCursor( Qt::SizeHorCursor );
else
setCursor( Qt::OpenHandCursor );
}
}
void GraphicsAudioItem::mousePressEvent( QGraphicsSceneMouseEvent* event )
{
TracksView* tv = Timeline::getInstance()->tracksView();
......
......@@ -71,6 +71,7 @@ protected:
void paintTitle( QPainter* painter, const QStyleOptionGraphicsItem* option );
virtual void hoverEnterEvent( QGraphicsSceneHoverEvent* event );
virtual void hoverLeaveEvent( QGraphicsSceneHoverEvent* event );
virtual void hoverMoveEvent( QGraphicsSceneHoverEvent* event );
virtual void mousePressEvent( QGraphicsSceneMouseEvent* event );
virtual void mouseReleaseEvent( QGraphicsSceneMouseEvent* event );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment