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:
parent
aeca5c6741
commit
a210b790b4
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user