diff options
| author | Jeff Carr <[email protected]> | 2024-01-28 12:09:48 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-28 12:09:48 -0600 |
| commit | 44ee09f79843d3b9fca666b2c2dbd298a4c4eaba (patch) | |
| tree | bc64f54827858e35729f3e5ca3c34f2167faa286 /widget.go | |
| parent | eca2f2aa481ea9c158592767eeeaceff09060466 (diff) | |
buttons work
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'widget.go')
| -rw-r--r-- | widget.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -109,7 +109,7 @@ func (w *guiWidget) SetVisible(b bool) { func addDropdown() *tree.Node { n := new(tree.Node) n.WidgetType = widget.Flag - n.WidgetId = -2 + n.WidgetId = 2222 n.ParentId = 0 // store the internal toolkit information @@ -128,7 +128,9 @@ func addDropdown() *tree.Node { // add this new widget on the binary tree tk.parent = me.treeRoot.TK.(*guiWidget) - if tk.parent != nil { + if tk.parent == nil { + panic("addDropdown() didn't get treeRoot guiWidget") + } else { tk.parent.children = append(tk.parent.children, tk) } |
