Scroll wheel doesn't move knobs/sliders

Bug #603112 reported by enry on 2010-07-08
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mixxx
Low
ironstorm

Bug Description

Regression bug: In 1.8 version it is no more possible to control knobs/sliders using scroll wheel while mouse pointer is on them.

Related branches

ironstorm (ironstorm-gmail) wrote :

The code that originally used to do that behaviour lived in the now retired track.cpp... here is the code that needs a new home:

    351 switch (e->type()) {
    352 case QEvent::Wheel: {
    353 QWidget* targetWidget;
    354 targetWidget = ((QWidget *)obj)->childAt(((QWheelEvent *)e)->x(), ((QWheelEvent *)e)->y());
    355 if (targetWidget == 0)
    356 {
    357 //qDebug() << "Mouse Wheel Event -- Null Target Object.";
    358 return true;
    359 };
    360 double wheelDirection = ((QWheelEvent *)e)->delta() / 120.;
    361 if (qobject_cast<WSliderComposed *>(targetWidget) != 0 || qobject_cast<WKnob *>(targetWidget) != 0) {
    362 double newValue = qobject_cast<WWidget *>(targetWidget)->getValue() + (wheelDirection);
    363 // qDebug() << "Mouse Wheel Event -- Destination Object Class Type:"<<targetWidget->metaObject()->className()<<" (target control's value:" << qobject_cast<WWidget *>(targetWidget)->getValue()
    363 << " event direction: "<<wheelDirection<<")";
    364 qobject_cast<WWidget *>(targetWidget)->updateValue(newValue);
    365 // } else if (qobject_cast<WVisualWaveform *>(targetWidget) != 0) {
    366 // qDebug() << "Manuiplate a"<<targetWidget->metaObject()->className()<<"...";
    367 // } else if (qobject_cast<WOverview *>(targetWidget) != 0) {
    368 // qDebug() << "Manuiplate a"<<targetWidget->metaObject()->className()<<"...";
    369 }
    370 return true;
    371 }
    372 break;
    373 // default: qDebug() << "Non SearchEdit Event: " << e->type(); break;
    374 default: break;
    375 }

Albert Santoni (gamegod) wrote :

Thanks Garth! You get the points for this one because it took me only like 10 minutes to fix. If you hadn't pasted that code, it would have taken me a lot longer. :)

Changed in mixxx:
assignee: nobody → ironstorm (ironstorm-gmail)
importance: Undecided → Low
milestone: none → 1.8.0
status: New → Fix Committed
RJ Skerry-Ryan (rryan) on 2010-10-05
Changed in mixxx:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers