testing code

This commit is contained in:
Jeff Carr 2025-03-05 03:00:11 -06:00
parent a88937c508
commit 784eac740f
3 changed files with 12 additions and 2 deletions

View File

@ -78,6 +78,8 @@ func theSuperMouse(g *gocui.Gui, v *gocui.View) error {
func theNotsure(g *gocui.Gui, v *gocui.View) error {
log.Info("got to theNotsure(). now what? dark =", me.dark)
me.refresh = true
log.Info("running VerifyParentId()")
me.treeRoot.VerifyParentId()
/*
if me.debug {
log.Info("debugging off")

View File

@ -1,7 +1,7 @@
// Copyright 2014 The gocui Authors. All rights reserved.
// Copyright 2017-2025 WIT.COM Inc. All rights reserved.
// Use of this source code is governed by the GPL 3.0
// Prior Copyright 2014 The gocui Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

View File

@ -91,8 +91,16 @@ func (tk *guiWidget) deleteWidget() {
p := tk.parent
for i, child := range p.children {
if tk == child {
log.Info("deleteWidget() found parent with child to delete:", i, child.cuiName)
log.Info("deleteWidget() found parent with child to delete:", i, child.cuiName, child.WidgetId())
p.children = slices.Delete(p.children, i, i+1)
}
}
tk.deleteTree()
}
func (tk *guiWidget) deleteTree() {
for _, child := range tk.children {
child.deleteTree()
}
tk.Hide()
}