mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 19:28:26 +08:00
scanwidget: wheel event handling cleanup (380634e)
This commit is contained in:
parent
2e73d6c89c
commit
fc60f3504c
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user