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:
parent
317f26c4e3
commit
18c131868c
|
@ -23,17 +23,17 @@ var debugGridLabel *Node
|
||||||
var debugWidgetBut1, debugWidgetBut2 *Node
|
var debugWidgetBut1, debugWidgetBut2 *Node
|
||||||
|
|
||||||
func setActiveWidget(w *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) {
|
if (w == nil) {
|
||||||
log(debugError, "setActiveWidget() was sent nil !!!")
|
log(debugError, "setActiveWidget() was sent nil !!!")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
activeWidget = w
|
activeWidget = w
|
||||||
log(true, "The Widget is set to", w.id, w.Name)
|
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
|
title := "ID =" + strconv.Itoa(w.id) + " " + w.widget.Name
|
||||||
activeLabel.SetText(title)
|
activeLabel.SetText(title)
|
||||||
activeLabelType.SetText("widget.Type = " + w.widget.Type.String())
|
activeLabelType.SetText("widget.Type = " + w.widget.Type.String())
|
||||||
|
@ -178,7 +178,9 @@ func DebugWidgetWindow(w *Node) {
|
||||||
// debugGrid = gShoactiveWidget.NewGrid("tmp grid", 2, 3)
|
// debugGrid = gShoactiveWidget.NewGrid("tmp grid", 2, 3)
|
||||||
})
|
})
|
||||||
|
|
||||||
setActiveWidget(g)
|
if (activeWidget == nil) {
|
||||||
|
setActiveWidget(Config.master)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *Node) debugAddWidgetButtons() {
|
func (n *Node) debugAddWidgetButtons() {
|
||||||
|
|
Loading…
Reference in New Issue