Skip to content

Commit

Permalink
fix mouse move event
Browse files Browse the repository at this point in the history
  • Loading branch information
hanjinliu committed May 10, 2024
1 parent 53d3797 commit cfed3af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tabulous/_qt/_table/_base/_enhanced_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ def mousePressEvent(self, e: QtGui.QMouseEvent) -> None:

def mouseMoveEvent(self, e: QtGui.QMouseEvent) -> None:
"""Scroll table plane when mouse is moved with right click."""
if e.buttons() == Qt.MouseButton.NoButton:
return None
if self._mouse_track.last_button == "right":
pos = e.pos()
dy = pos.y() - self._mouse_track.last_rightclick_pos.y()
Expand Down

0 comments on commit cfed3af

Please sign in to comment.