diff options
Diffstat (limited to 'window.go')
| -rw-r--r-- | window.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -147,18 +147,18 @@ func (parent *Node) makeNode(title string, x int, y int) *Node { return &node } -func (parent *Node) AddNode(title string) *Node { +func (n *Node) AddNode(title string) *Node { var node Node node.Name = title - node.Width = parent.Width - node.Height = parent.Height + node.Width = n.Width + node.Height = n.Height id := Config.prefix + strconv.Itoa(Config.counter) Config.counter += 1 node.id = id - parent.Append(&node) - node.parent = parent + n.Append(&node) + node.parent = n return &node } |
