summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2000-09-07 15:05:09 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2000-09-07 15:05:09 (GMT)
commita249f16af03ab2091b59e12faaefe642f95a85ea (patch)
tree7415799a6a48fc9f13fce2a44675a15a016ec024 /Lib/lib-tk
parentebba420285990ab01973765eea03498eab170ae7 (diff)
downloadcpython-a249f16af03ab2091b59e12faaefe642f95a85ea.zip
cpython-a249f16af03ab2091b59e12faaefe642f95a85ea.tar.gz
cpython-a249f16af03ab2091b59e12faaefe642f95a85ea.tar.bz2
Older Tk versions don't support mousewheel support. Set event.delta
to zero if that's the case (closes bug #113727)
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r--Lib/lib-tk/Tkinter.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index e2f09a5..3a1d7a4 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -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."""