Squashed commit of the following:

commit 2ec8d13bf0f6f86386b9e0a39c550b103fffa176
Author: Jeff Carr <jcarr@wit.com>
Date:   Sun Mar 12 09:37:45 2023 -0500

    smartly default to the binary tree master

    Signed-off-by: Jeff Carr <jcarr@wit.com>

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2023-03-12 09:42:16 -05:00
parent 317f26c4e3
commit 18c131868c
1 changed files with 8 additions and 6 deletions

View File

@ -23,17 +23,17 @@ var debugGridLabel *Node
var debugWidgetBut1, debugWidgetBut2 *Node
func setActiveWidget(w *Node) {
if (activeLabel == nil) {
// the debug window doesn't exist yet
// TODO: make a fake binary tree for this(?)
return
}
if (w == nil) {
log(debugError, "setActiveWidget() was sent nil !!!")
return
}
activeWidget = w
log(true, "The Widget is set to", w.id, w.Name)
if (activeLabel == nil) {
// the debug window doesn't exist yet so you can't display the change
// TODO: make a fake binary tree for this(?)
return
}
title := "ID =" + strconv.Itoa(w.id) + " " + w.widget.Name
activeLabel.SetText(title)
activeLabelType.SetText("widget.Type = " + w.widget.Type.String())
@ -178,7 +178,9 @@ func DebugWidgetWindow(w *Node) {
// debugGrid = gShoactiveWidget.NewGrid("tmp grid", 2, 3)
})
setActiveWidget(g)
if (activeWidget == nil) {
setActiveWidget(Config.master)
}
}
func (n *Node) debugAddWidgetButtons() {