diff --git a/labelme/widgets/canvas.py b/labelme/widgets/canvas.py index d71a6125b..49b73b944 100644 --- a/labelme/widgets/canvas.py +++ b/labelme/widgets/canvas.py @@ -908,6 +908,9 @@ def wheelEvent(self, ev): # with Ctrl/Command key # zoom self.zoomRequest.emit(delta.y(), ev.pos()) + elif QtCore.Qt.ShiftModifier == int(mods): + # Convert wheel y(up down) direction to horizontal scroll with Shift key + self.scrollRequest.emit(delta.y(), QtCore.Qt.Horizontal) else: # scroll self.scrollRequest.emit(delta.x(), QtCore.Qt.Horizontal)