Version: (using KDE 4.0.3) Installed from: Ubuntu Packages When I use the mousewheel over the text area in Kate or Kwrite, everything works normally. The text scrolls, and the scrollbar moves down to match it. However, if I move the cursor over the scrollbar, it stops working. The scrollbar will go down, but the text remains exactly the same. Expected behaviour: When using mousewheel over scrollbar, both scrollbar and text scroll exactly as if it were over the text area. Observed behaviour: When using mousewheel over scrollbar, only the scrollbar moves. The text area remains exactly the same. Clicking on the text does not trigger a refresh. If I mousewheel-scroll over the text area, the scrollbar will jump back to the old/correct position.
*** Bug 161880 has been marked as a duplicate of this bug. ***
I can confirm this with kate 4.0.74 installed from debian experimental packages.
Hello, I took some time this morning and tried to fix this bug... There are two ways to fix this actually. My first thought was to override whellEvent on the scrollbar and send the event to the view, something like this (tested with kwrite and works, patch is against kdelibs r834504): Index: kate/view/kateviewhelpers.cpp =================================================================== --- kate/view/kateviewhelpers.cpp (revision 834504) +++ kate/view/kateviewhelpers.cpp (working copy) @@ -188,6 +188,11 @@ } } +void KateScrollBar::wheelEvent(QWheelEvent *e) +{ + QCoreApplication::sendEvent(m_viewInternal, e); +} + void KateScrollBar::marksChanged() { recomputeMarksPositions(); Index: kate/view/kateviewhelpers.h =================================================================== --- kate/view/kateviewhelpers.h (revision 834504) +++ kate/view/kateviewhelpers.h (working copy) @@ -73,6 +73,7 @@ virtual void resizeEvent(QResizeEvent *); virtual void styleChange(QStyle &oldStyle); virtual void sliderChange ( SliderChange change ); + virtual void wheelEvent(QWheelEvent *e); protected Q_SLOTS: void sliderMaybeMoved(int value); ...but then I found a commented-out hack that works too if uncommented. It seems to have been commented out in r473347 (more than two years ago) for some reason. Just uncommenting this works too and seems to be the right thing to do, unless it causes some regression or other trouble. The decision is yours... :) Index: kate/view/kateviewinternal.cpp =================================================================== --- kate/view/kateviewinternal.cpp (revision 834504) +++ kate/view/kateviewinternal.cpp (working copy) @@ -144,7 +144,7 @@ connect(m_lineScroll, SIGNAL(sliderMMBMoved(int)), SLOT(scrollLines(int))); // catch wheel events, completing the hijack - //m_lineScroll->installEventFilter(this); + m_lineScroll->installEventFilter(this); // // scrollbar for columns
*** Bug 164360 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 158466 ***
SVN commit 858143 by cullmann: fix scrolling with wheel on scrollbar BUG: 161412 M +5 -0 kateviewhelpers.cpp M +1 -0 kateviewhelpers.h --- trunk/KDE/kdelibs/kate/view/kateviewhelpers.cpp #858142:858143 @@ -196,6 +196,11 @@ } } +void KateScrollBar::wheelEvent(QWheelEvent *e) +{ + QCoreApplication::sendEvent(m_viewInternal, e); +} + void KateScrollBar::marksChanged() { recomputeMarksPositions(); --- trunk/KDE/kdelibs/kate/view/kateviewhelpers.h #858142:858143 @@ -74,6 +74,7 @@ virtual void resizeEvent(QResizeEvent *); virtual void styleChange(QStyle &oldStyle); virtual void sliderChange ( SliderChange change ); + virtual void wheelEvent(QWheelEvent *e); protected Q_SLOTS: void sliderMaybeMoved(int value);
I still have this bug in KDE 4.1.3/Kate 3.1.3
>I still have this bug in KDE 4.1.3/Kate 3.1.3 I second that
It works fine in trunk. It was simply not backported to the 4.1 branch.
*** Bug 185197 has been marked as a duplicate of this bug. ***