summaryrefslogtreecommitdiff
path: root/widget.go
diff options
context:
space:
mode:
Diffstat (limited to 'widget.go')
-rw-r--r--widget.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/widget.go b/widget.go
index 9626861..9b3bc5f 100644
--- a/widget.go
+++ b/widget.go
@@ -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)
}