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

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) { ...@@ -37,12 +37,9 @@ bool SpinBoxEventFilter::eventFilter(QObject *object, QEvent *event) {
if (event->type() != QEvent::Wheel) return QObject::eventFilter(object, event); if (event->type() != QEvent::Wheel) return QObject::eventFilter(object, event);
/* QWidget *widget = qobject_cast<QWidget*>(object);
* We only need the QWidget-Pointer to check whether object
* is contained in scrollAreas, so a static_cast is safe here if (scrollAreas.find(widget) != scrollAreas.end()) {
* (and faster than a dynamic_cast).
*/
if (scrollAreas.find(static_cast<QWidget*>(object)) != scrollAreas.end()) {
#ifdef VERBOSE_DEBUGGING_OUTPUT #ifdef VERBOSE_DEBUGGING_OUTPUT
std::cout << "Reset isScrolling." << std::endl; std::cout << "Reset isScrolling." << std::endl;
#endif #endif
...@@ -50,7 +47,7 @@ bool SpinBoxEventFilter::eventFilter(QObject *object, QEvent *event) { ...@@ -50,7 +47,7 @@ bool SpinBoxEventFilter::eventFilter(QObject *object, QEvent *event) {
return QObject::eventFilter(object, event); return QObject::eventFilter(object, event);
} }
if (!isScrolling()) { if (!isScrolling() && widget->isEnabled()) {
#ifdef VERBOSE_DEBUGGING_OUTPUT #ifdef VERBOSE_DEBUGGING_OUTPUT
std::cout << "Not scrolling. Letting wheel event pass." << std::endl; std::cout << "Not scrolling. Letting wheel event pass." << std::endl;
#endif #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