diff options
Diffstat (limited to 'checkbox.go')
| -rw-r--r-- | checkbox.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/checkbox.go b/checkbox.go index 8e949b2..e7e91e7 100644 --- a/checkbox.go +++ b/checkbox.go @@ -23,16 +23,16 @@ func setChecked(n *tree.Node, b bool) { // redraw the checkbox func (tk *guiWidget) setCheckbox() { - if tk.node.WidgetType != widget.Checkbox { - log.Log(WARN, "setCheckbox() being run on widget:", tk.node.WidgetType) + if tk.WidgetType() != widget.Checkbox { + log.Log(WARN, "setCheckbox() being run on widget:", tk.WidgetType()) return } - if tk.node.State.Checked { - log.Log(WARN, "setCheckbox() got true", tk.node.State.Checked) - tk.labelN = "X " + tk.node.State.Label + if tk.Checked() { + log.Log(WARN, "setCheckbox() got true", tk.Checked()) + tk.labelN = "X " + tk.GetLabel() } else { - log.Log(WARN, "setCheckbox() got false", tk.node.State.Checked) - tk.labelN = "_ " + tk.node.State.Label + log.Log(WARN, "setCheckbox() got false", tk.Checked()) + tk.labelN = "_ " + tk.GetLabel() } tk.Hide() |
