more pyqt6 enum goodness

This commit is contained in:
Kovid Goyal 2022-02-02 22:06:36 +05:30
parent 3288b2a4e4
commit dd0414e11b
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -1159,7 +1159,7 @@ def selectionCommand(self, index, event):
return super().selectionCommand(index, event)
def wheelEvent(self, ev):
if ev.phase() not in (Qt.ScrollPhase.ScrollUpdate, 0, Qt.ScrollPhase.ScrollMomentum):
if ev.phase() not in (Qt.ScrollPhase.ScrollUpdate, Qt.ScrollPhase.NoScrollPhase, Qt.ScrollPhase.ScrollMomentum):
return
number_of_pixels = ev.pixelDelta()
number_of_degrees = ev.angleDelta() / 8.0