2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 11:18:27 +08:00

gui: ignore only unmodified wheelevents

This commit is contained in:
Robert Jördens 2016-03-08 15:53:27 +01:00
parent 00d4775da5
commit 41ca223c45

View File

@ -17,11 +17,11 @@ def log_level_to_name(level):
class _WheelFilter(QtCore.QObject):
def eventFilter(self, obj, event):
if event.type() == QtCore.QEvent.Wheel:
if (event.type() == QtCore.QEvent.Wheel and
event.modifiers() == QtCore.Qt.NoModifier):
event.ignore()
return True
else:
return False
return False
def disable_scroll_wheel(widget):