1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Added combo boxes to the mouse wheel filter.

This commit is contained in:
Laura Sebesta 2012-05-22 12:19:20 +03:00
parent aeca5c6741
commit a210b790b4

View File

@ -1170,12 +1170,17 @@ void ConfigTaskWidget::disableMouseWheelEvents()
foreach( QSlider * sp, findChildren<QSlider*>() ) {
sp->installEventFilter( this );
}
foreach( QComboBox * sp, findChildren<QComboBox*>() ) {
sp->installEventFilter( this );
}
}
bool ConfigTaskWidget::eventFilter( QObject * obj, QEvent * evt ) {
//Filter all wheel events, and ignore them
if ( evt->type() == QEvent::Wheel &&
(qobject_cast<QAbstractSpinBox*>( obj ) || qobject_cast<QAbstractSlider*>( obj ) ))
(qobject_cast<QAbstractSpinBox*>( obj ) ||
qobject_cast<QComboBox*>( obj ) ||
qobject_cast<QAbstractSlider*>( obj ) ))
{
evt->ignore();
return true;