mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix mouse wheel not working in diff view
This commit is contained in:
parent
f1842ae443
commit
abf157b816
@ -6,7 +6,8 @@ from __future__ import (unicode_literals, division, absolute_import,
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
# QT5XX: See why mouse wheel is not working in diff view
|
||||
# QT5XX: Port def wheelEvent() (orientation() and delta() to be replaced by
|
||||
# angleDelta())
|
||||
|
||||
# QT5XX: Delete this file after migration is completed
|
||||
|
||||
|
@ -381,7 +381,7 @@ class TextBrowser(PlainTextEdit): # {{{
|
||||
painter.drawLine(0, bottom - 1, w, bottom - 1)
|
||||
|
||||
def wheelEvent(self, ev):
|
||||
if ev.orientation() == Qt.Vertical:
|
||||
if ev.angleDelta().x() == 0:
|
||||
self.wheel_event.emit(ev)
|
||||
else:
|
||||
return PlainTextEdit.wheelEvent(self, ev)
|
||||
@ -488,7 +488,7 @@ class DiffSplitHandle(QSplitterHandle): # {{{
|
||||
return ans
|
||||
|
||||
def wheelEvent(self, ev):
|
||||
if ev.orientation() == Qt.Vertical:
|
||||
if ev.angleDelta().x() == 0:
|
||||
self.wheel_event.emit(ev)
|
||||
else:
|
||||
return QSplitterHandle.wheelEvent(self, ev)
|
||||
|
Loading…
x
Reference in New Issue
Block a user