summaryrefslogtreecommitdiff
path: root/click.go
diff options
context:
space:
mode:
Diffstat (limited to 'click.go')
-rw-r--r--click.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/click.go b/click.go
index 73583da..462a409 100644
--- a/click.go
+++ b/click.go
@@ -150,13 +150,16 @@ func (w *guiWidget) doWidgetClick() {
}
// w.dumpTree("click end")
case widget.Checkbox:
- if widget.GetBool(w.value) {
- w.setCheckbox(false)
+ if w.node.State.Checked {
+ log.Log(WARN, "checkbox is being set to false")
+ w.node.State.Checked = false
+ w.setCheckbox()
} else {
- w.setCheckbox(true)
+ log.Log(WARN, "checkbox is being set to true")
+ w.node.State.Checked = true
+ w.setCheckbox()
}
- // n.doUserEvent()
- me.myTree.SendUserEvent(me.treeRoot)
+ me.myTree.SendUserEvent(w.node)
case widget.Grid:
newR := w.realGocuiSize()