Skip to content

Commit

Permalink
Side scroll request direction change handle on Mac os
Browse files Browse the repository at this point in the history
  • Loading branch information
Kokika committed Oct 6, 2024
1 parent d80e58d commit 5586451
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion labelme/widgets/canvas.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import imgviz
import platform
from qtpy import QtCore
from qtpy import QtGui
from qtpy import QtWidgets
Expand Down Expand Up @@ -920,7 +921,7 @@ def wheelEvent(self, ev):
# with Ctrl/Command key
# zoom
self.zoomRequest.emit(delta.y(), ev.pos())
elif QtCore.Qt.ShiftModifier == int(mods):
elif QtCore.Qt.ShiftModifier == int(mods) and platform.system() != "Darwin":
# side scroll
self.scrollRequest.emit(delta.y(), QtCore.Qt.Horizontal)
self.scrollRequest.emit(delta.x(), QtCore.Qt.Vertical)
Expand Down

0 comments on commit 5586451

Please sign in to comment.