summaryrefslogtreecommitdiff
path: root/treeDraw.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-07 00:08:44 -0600
committerJeff Carr <[email protected]>2025-02-07 00:08:44 -0600
commite96cb4375c9f4ffc45389a9df8c59116710532a4 (patch)
tree954880939a74b27681ce47dc8647241f4fb1907c /treeDraw.go
parentc2f8cac4a9f9737eee5983ca7ce81fde8c102715 (diff)
code cleanups
Diffstat (limited to 'treeDraw.go')
-rw-r--r--treeDraw.go37
1 files changed, 3 insertions, 34 deletions
diff --git a/treeDraw.go b/treeDraw.go
index ec63df5..34486e6 100644
--- a/treeDraw.go
+++ b/treeDraw.go
@@ -133,47 +133,16 @@ func (w *guiWidget) drawTree(draw bool) {
}
func (w *guiWidget) Show() {
- // don't display fake widgets
if w.isFake {
+ // don't display fake widgets
return
}
- // deprecate this
- // if this isn't in the binary tree
- // it's some internal widget so always display those
- /*
- if w.node == nil {
- w.drawView()
- return
- }
- */
-
if w.Hidden() {
+ // recursively checks if the parent is hidden
+ // never show hidden widgets
return
}
- // deprecate this
- // always show window titles
- if w.node.WidgetType == widget.Window {
- w.drawView()
- return
- }
-
- /*
- // if the widget is not in the current displayed windo
- if !w.IsCurrent() {
- // log.Log(GOCUI, "Show() w.IsCurrent == false. NOT drawing", w.cuiName, w.String())
- return
- }
- */
-
- // this comes from the application developer
- // finally, check if the widget State is hidden or not
- if w.Hidden() {
- // log.Log(GOCUI, "Show() w.node.Hidden() = false. not drawing", w.cuiName, w.String())
- // don't display hidden widgets
- return
- }
- // log.Log(GOCUI, "Show() doing w.drawView()", w.cuiName, w.String())
w.drawView()
}