[vlc-commits] Playlist: fix scrolling events in selector
Jean-Baptiste Kempf
git at videolan.org
Sun May 22 21:29:22 CEST 2011
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun May 22 21:29:05 2011 +0200| [2cb994d6ddb6bd5ce5dd345f52a0d575d06f47e2] | committer: Jean-Baptiste Kempf
Playlist: fix scrolling events in selector
Close #4092
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2cb994d6ddb6bd5ce5dd345f52a0d575d06f47e2
---
modules/gui/qt4/components/playlist/selector.cpp | 6 ++++++
modules/gui/qt4/components/playlist/selector.hpp | 1 +
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/selector.cpp b/modules/gui/qt4/components/playlist/selector.cpp
index 5ea7512..cd293f1 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 acdc476..7657fa2 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();
More information about the vlc-commits
mailing list