]> git.sesse.net Git - vlc/commitdiff
Qt: Prevent volume up/down on mouseWheel events inside StdPLPanel
authorJean-Philippe André <jpeg@videolan.org>
Sun, 17 Jan 2010 12:16:55 +0000 (13:16 +0100)
committerJean-Philippe André <jpeg@videolan.org>
Sun, 17 Jan 2010 15:50:19 +0000 (16:50 +0100)
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.hpp

index 53da40d95ac8754c81c172d4999baded963b7df4..aaeb0d16cb6918a8ccc46bdff011396d2620e79a 100644 (file)
@@ -42,6 +42,7 @@
 #include <QLabel>
 #include <QMenu>
 #include <QSignalMapper>
+#include <QWheelEvent>
 
 #include <assert.h>
 
@@ -354,3 +355,9 @@ bool StandardPLPanel::eventFilter( QObject *obj, QEvent *event )
     }
     return true;
 }
+
+void StandardPLPanel::wheelEvent( QWheelEvent *e )
+{
+    // Accept this event in order to prevent unwanted volume up/down changes
+    e->accept();
+}
index b350af7a9bd95aadf40794daa3ae90043d113915..7e1a620b0027be330c9dc19c78246ac3fe51d356 100644 (file)
@@ -43,6 +43,7 @@ class QListView;
 class PLModel;
 class QPushButton;
 class QKeyEvent;
+class QWheelEvent;
 
 class StandardPLPanel: public QWidget
 {
@@ -56,6 +57,7 @@ protected:
     friend class PlaylistWidget;
 
     virtual void keyPressEvent( QKeyEvent *e );
+    virtual void wheelEvent( QWheelEvent *e );
 
     bool eventFilter(QObject *obj, QEvent *event);