diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-08-18 10:50:13 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-08-18 10:50:13 +0200 |
commit | 4b47def8c9b3497295a32f4dd7dad53d0c83a751 (patch) | |
tree | 2e41c1eaf2770e35a7d2b70b229c6de9c455c377 /src | |
parent | Merge commit 'refs/merge-requests/174' of git://gitorious.org/rekonq/mainline... (diff) | |
parent | Remove a space (diff) | |
download | rekonq-4b47def8c9b3497295a32f4dd7dad53d0c83a751.tar.xz |
Merge commit 'refs/merge-requests/2290' of git://gitorious.org/rekonq/mainline into m2290
Diffstat (limited to 'src')
-rw-r--r-- | src/webview.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/webview.cpp b/src/webview.cpp index 441225af..b710719f 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -536,13 +536,11 @@ void WebView::keyPressEvent(QKeyEvent *event) } - - - void WebView::wheelEvent(QWheelEvent *event) { - if (!ReKonfig::smoothScrolling() || page()->currentFrame()->hitTestContent(event->pos()).isContentEditable()) - KWebView::wheelEvent(event); + // To let some websites (eg: google maps) to handle wheel events + int ypos = page()->currentFrame()->scrollPosition().y(); + KWebView::wheelEvent(event); // Sync with the zoom slider if (event->modifiers() == Qt::ControlModifier) @@ -560,8 +558,10 @@ void WebView::wheelEvent(QWheelEvent *event) emit zoomChanged(newFactor); } - else if ( ReKonfig::smoothScrolling() && !page()->currentFrame()->hitTestContent(event->pos()).isContentEditable()) + else if (ReKonfig::smoothScrolling() && ypos != page()->currentFrame()->scrollPosition().y()) { + page()->currentFrame()->setScrollPosition(QPoint(page()->currentFrame()->scrollPosition().x(), ypos)); + int numDegrees = event->delta() / 8; int numSteps = numDegrees / 15; |