E-book viewer: Fix Qt 5.7 breaking mouse wheel scrolling

This commit is contained in:
Kovid Goyal 2016-06-29 09:19:54 +05:30
parent 177c22ce5b
commit 5774d52620

View File

@ -1243,7 +1243,8 @@ class DocumentView(QWebView): # {{{
painter.end()
def wheelEvent(self, event):
if event.phase() != Qt.ScrollUpdate:
if event.phase() not in (Qt.ScrollUpdate, 0):
# 0 is Qt.NoScrollPhase which is not yet available in PyQt
return
mods = event.modifiers()
num_degrees = event.angleDelta().y() // 8