From c627898ec1f06b4dae1620299739e0f40eafe6a6 Mon Sep 17 00:00:00 2001 From: volconst <20997907+volconst@users.noreply.github.com> Date: Sat, 19 Sep 2020 18:32:41 +0300 Subject: [PATCH] Fix duplicate wheel event delivery #1110 In Debian, Ubuntu. --- printrun/gcview.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/printrun/gcview.py b/printrun/gcview.py index e07d712f1..3565c8eab 100755 --- a/printrun/gcview.py +++ b/printrun/gcview.py @@ -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():