From 2cb994d6ddb6bd5ce5dd345f52a0d575d06f47e2 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Sun, 22 May 2011 21:29:05 +0200 Subject: [PATCH] Playlist: fix scrolling events in selector Close #4092 --- modules/gui/qt4/components/playlist/selector.cpp | 6 ++++++ modules/gui/qt4/components/playlist/selector.hpp | 1 + 2 files changed, 7 insertions(+) diff --git a/modules/gui/qt4/components/playlist/selector.cpp b/modules/gui/qt4/components/playlist/selector.cpp index 5ea7512283..cd293f127f 100644 --- a/modules/gui/qt4/components/playlist/selector.cpp +++ b/modules/gui/qt4/components/playlist/selector.cpp @@ -530,3 +530,9 @@ void PLSelector::getCurrentSelectedItem( int* type, QString *string) *type = currentItem()->data( 0, TYPE_ROLE ).toInt(); *string = currentItem()->data( 0, NAME_ROLE ).toString(); } + +void PLSelector::wheelEvent( QWheelEvent *e ) +{ + // Accept this event in order to prevent unwanted volume up/down changes + e->accept(); +} diff --git a/modules/gui/qt4/components/playlist/selector.hpp b/modules/gui/qt4/components/playlist/selector.hpp index acdc476c7b..7657fa292a 100644 --- a/modules/gui/qt4/components/playlist/selector.hpp +++ b/modules/gui/qt4/components/playlist/selector.hpp @@ -123,6 +123,7 @@ protected: virtual void dragMoveEvent ( QDragMoveEvent * event ); virtual bool dropMimeData ( QTreeWidgetItem *, int, const QMimeData *, Qt::DropAction ); virtual QStringList mimeTypes () const; + virtual void wheelEvent(QWheelEvent *e); private: void createItems(); -- 2.11.4.GIT