3064887ae2
This reverts commit b5843caa484068d6fcc5f5fe8ee2dc06078500ff. This breaks some hotkeys because the signals are tied to a signal which is now triggered because "toggled" is used instead of "clicked", so just revert it for now for the release and look at it later post-patch.
23 lines
465 B
C++
23 lines
465 B
C++
#include "slider-ignorewheel.hpp"
|
|
|
|
SliderIgnoreScroll::SliderIgnoreScroll(QWidget *parent) : QSlider(parent)
|
|
{
|
|
setFocusPolicy(Qt::StrongFocus);
|
|
}
|
|
|
|
SliderIgnoreScroll::SliderIgnoreScroll(Qt::Orientation orientation,
|
|
QWidget *parent)
|
|
: QSlider(parent)
|
|
{
|
|
setFocusPolicy(Qt::StrongFocus);
|
|
setOrientation(orientation);
|
|
}
|
|
|
|
void SliderIgnoreScroll::wheelEvent(QWheelEvent *event)
|
|
{
|
|
if (!hasFocus())
|
|
event->ignore();
|
|
else
|
|
QSlider::wheelEvent(event);
|
|
}
|