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

scanwidget: wheel event handling cleanup (380634e)

This commit is contained in:
Robert Jördens 2016-03-14 18:06:18 +01:00
parent 2e73d6c89c
commit fc60f3504c

View File

@ -364,7 +364,7 @@ class ScanWidget(QtWidgets.QWidget):
return
self.setView(newLeft, newScale)
def _wheelEvent(self, ev):
def wheelEvent(self, ev):
y = ev.angleDelta().y()
if ev.modifiers() & QtCore.Qt.ShiftModifier:
# If shift+scroll, modify number of points.
@ -405,7 +405,7 @@ class ScanWidget(QtWidgets.QWidget):
def eventFilter(self, obj, ev):
if ev.type() == QtCore.QEvent.Wheel:
self._wheelEvent(ev)
ev.ignore()
return True
if ev.type() == QtCore.QEvent.Resize:
ev.ignore()