]> granicus.if.org Git - python/commitdiff
Older Tk versions don't support mousewheel support. Set event.delta
authorFredrik Lundh <fredrik@pythonware.com>
Thu, 7 Sep 2000 15:05:09 +0000 (15:05 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Thu, 7 Sep 2000 15:05:09 +0000 (15:05 +0000)
to zero if that's the case (closes bug #113727)

Lib/lib-tk/Tkinter.py

index e2f09a5a72b4033e6ffc7918c23ab6ca98d2e911..3a1d7a4eae3804c36556e9f7b86f1f3d8585603e 100644 (file)
@@ -1050,7 +1050,10 @@ class Misc:
             e.widget = W
         e.x_root = getint(X)
         e.y_root = getint(Y)
-        e.delta = getint(D)
+        try:
+            e.delta = getint(D)
+        except ValueError:
+            e.delta = 0
         return (e,)
     def _report_exception(self):
         """Internal function."""