Commit 435f1255 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke

Allowing scrolling to start above a disabled widget.


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17187 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c17048de
......@@ -37,12 +37,9 @@ bool SpinBoxEventFilter::eventFilter(QObject *object, QEvent *event) {
if (event->type() != QEvent::Wheel) return QObject::eventFilter(object, event);
/*
* We only need the QWidget-Pointer to check whether object
* is contained in scrollAreas, so a static_cast is safe here
* (and faster than a dynamic_cast).
*/
if (scrollAreas.find(static_cast<QWidget*>(object)) != scrollAreas.end()) {
QWidget *widget = qobject_cast<QWidget*>(object);
if (scrollAreas.find(widget) != scrollAreas.end()) {
#ifdef VERBOSE_DEBUGGING_OUTPUT
std::cout << "Reset isScrolling." << std::endl;
#endif
......@@ -50,7 +47,7 @@ bool SpinBoxEventFilter::eventFilter(QObject *object, QEvent *event) {
return QObject::eventFilter(object, event);
}
if (!isScrolling()) {
if (!isScrolling() && widget->isEnabled()) {
#ifdef VERBOSE_DEBUGGING_OUTPUT
std::cout << "Not scrolling. Letting wheel event pass." << std::endl;
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment