forked from M-Labs/artiq
1
0
Fork 0

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
1 changed files with 2 additions and 2 deletions

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()