axis: work around python-tk "True" bug

Close #146.

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This commit is contained in:
Jeff Epler 2016-08-18 21:18:18 -05:00
parent 59bb8d4fbb
commit 1bec919b66

View file

@ -1237,6 +1237,13 @@ widgets = nf.Widgets(root_window,
("homemenu", Menu, ".menu.machine.home"), ("homemenu", Menu, ".menu.machine.home"),
("unhomemenu", Menu, ".menu.machine.unhome") ("unhomemenu", Menu, ".menu.machine.unhome")
) )
# Work around an apparent regression in python-tk which causes the value
# associated with the Y axis button to be changed to the string "True",
# related to the interpretation of the string "y" as true in a boolean
# context in Tcl's typeless value system.
# https://github.com/LinuxCNC/linuxcnc/issues/146
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834783
widgets.axis_y.configure(value="y")
def activate_axis(i, force=0): def activate_axis(i, force=0):
if not force and not manual_ok(): return if not force and not manual_ok(): return