Skip to content

Commit

Permalink
disable output for clipped custom tree nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
aarzilli committed Jun 14, 2018
1 parent 18692a3 commit d717573
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions nucular.go
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,11 @@ func (win *Window) TreePushCustom(type_ TreeType, name string, initial_open bool
styleButton = &style.Tab.TabButton
}
doButton(win, label.S(symbolType), sym, styleButton, in, false)

out = &win.cmds
if !widget_state {
out = nil
}

/* increase x-axis cursor widget position pointer */
if node.Open {
Expand All @@ -1448,9 +1453,9 @@ func (win *Window) TreePushCustom(type_ TreeType, name string, initial_open bool
layout.Width -= (style.Tab.Indent + panel_padding.X)
layout.Row.TreeDepth++
win.curNode = node
return labelBounds, &win.cmds, true
return labelBounds, out, true
} else {
return labelBounds, &win.cmds, false
return labelBounds, out, false
}
}

Expand Down

0 comments on commit d717573

Please sign in to comment.