Commit 2c13ce17 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: activate playlist item on right click (fix #2749)

Also, show the popup menu on press rather than release.
parent 83116c1c
...@@ -93,15 +93,18 @@ public: ...@@ -93,15 +93,18 @@ public:
void mouseReleaseEvent( QMouseEvent* e ) void mouseReleaseEvent( QMouseEvent* e )
{ {
if( e->button() & Qt::RightButton ) if( e->button() & Qt::RightButton )
{ return; /* Do NOT forward to QTreeView!! */
emit rightClicked( indexAt( QPoint( e->x(), e->y() ) ),
QCursor::pos() );
}
QTreeView::mouseReleaseEvent( e ); QTreeView::mouseReleaseEvent( e );
} }
void mousePressEvent( QMouseEvent* e ) void mousePressEvent( QMouseEvent* e )
{ {
if( e->button() & Qt::RightButton )
{
emit rightClicked( indexAt( QPoint( e->x(), e->y() ) ),
QCursor::pos() );
return;
}
if( e->button() & Qt::LeftButton ) if( e->button() & Qt::LeftButton )
{ {
if( !indexAt( QPoint( e->x(), e->y() ) ).isValid() ) if( !indexAt( QPoint( e->x(), e->y() ) ).isValid() )
......
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