summaryrefslogtreecommitdiff
path: root/addNode.go
diff options
context:
space:
mode:
Diffstat (limited to 'addNode.go')
-rw-r--r--addNode.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/addNode.go b/addNode.go
index e0af110..cab2852 100644
--- a/addNode.go
+++ b/addNode.go
@@ -24,19 +24,19 @@ func (me *TreeInfo) AddNode(a *widget.Action) *Node {
if a.WidgetType == widget.Root {
log.Log(TREE, "AddNode() Root")
n.Parent = n
- me.treeRoot = n
+ treeRoot = n
return n
}
- if me.treeRoot.FindWidgetId(a.WidgetId) != nil {
+ if treeRoot.FindWidgetId(a.WidgetId) != nil {
log.Log(TREEWARN, "AddNode() WidgetId already exists", a.WidgetId)
log.Log(TREEWARN, "probably this is a Show() / Hide() issue")
log.Log(TREEWARN, "TODO: figure out what to do here")
- return me.treeRoot.FindWidgetId(a.WidgetId)
+ return treeRoot.FindWidgetId(a.WidgetId)
}
// add this new widget on the binary tree
- p := me.treeRoot.FindWidgetId(a.ParentId)
+ p := treeRoot.FindWidgetId(a.ParentId)
n.Parent = p
if n.Parent == nil {
log.Log(TREEWARN, "AddNode() ERROR n.Parent == nil n =", n.WidgetId, n.WidgetType, n.GetProgName())