Skip to content

Commit

Permalink
Fix duplicate wheel event delivery kliment#1110
Browse files Browse the repository at this point in the history
 In Debian, Ubuntu.
  • Loading branch information
volconst committed Sep 19, 2020
1 parent e6c58ac commit c627898
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions printrun/gcview.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,14 @@ def layerdown(self):
self.parent.setlayercb(new_layer)
wx.CallAfter(self.Refresh)

wheelTimestamp = None
def handle_wheel(self, event):
if self.wheelTimestamp == event.Timestamp:
# filter duplicate event delivery in Ubuntu, Debian issue #1110
return

self.wheelTimestamp = event.Timestamp

delta = event.GetWheelRotation()
factor = 1.05
if event.ControlDown():
Expand Down

0 comments on commit c627898

Please sign in to comment.