From 65f71aed6c3e81116d3687b61336b90a0d085792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 21 May 2009 21:32:02 +0300 Subject: [PATCH] Qt4: activate playlist item on right click (fix #2749) Also, show the popup menu on press rather than release. --- modules/gui/qt4/util/customwidgets.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/gui/qt4/util/customwidgets.hpp b/modules/gui/qt4/util/customwidgets.hpp index d1f1f74809..ea5b3309a1 100644 --- a/modules/gui/qt4/util/customwidgets.hpp +++ b/modules/gui/qt4/util/customwidgets.hpp @@ -93,15 +93,18 @@ public: void mouseReleaseEvent( QMouseEvent* e ) { if( e->button() & Qt::RightButton ) - { - emit rightClicked( indexAt( QPoint( e->x(), e->y() ) ), - QCursor::pos() ); - } + return; /* Do NOT forward to QTreeView!! */ QTreeView::mouseReleaseEvent( 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( !indexAt( QPoint( e->x(), e->y() ) ).isValid() ) -- 2.22.0