summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-03-12 09:42:16 -0500
committerJeff Carr <[email protected]>2023-03-12 09:42:16 -0500
commit6a848bf40474365cc1c0b4da9e2f7e3e10b4d627 (patch)
tree7ba6f0268b97f5b4bccf3254a433180bd347e30a
parent75b2e25c843885b1c212ae41731f7307a4741d8e (diff)
Squashed commit of the following:v0.7
commit 2ec8d13bf0f6f86386b9e0a39c550b103fffa176 Author: Jeff Carr <[email protected]> Date: Sun Mar 12 09:37:45 2023 -0500 smartly default to the binary tree master Signed-off-by: Jeff Carr <[email protected]> Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--debugWidget.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/debugWidget.go b/debugWidget.go
index 031f76d..7b32f96 100644
--- a/debugWidget.go
+++ b/debugWidget.go
@@ -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() {