this actually worked?

This commit is contained in:
Jeff Carr 2025-02-21 15:50:46 -06:00
parent 34b0c787c3
commit 878f55cfcb
1 changed files with 19 additions and 3 deletions

View File

@ -82,9 +82,25 @@ func (grid *Node) makeGridLabel(pb *guipb.Widget, w int, h int) *Node {
}
func (me *TreeInfo) makeTable(t *guipb.Table) {
win := makeTableWindow(t.Window)
grid := win.makeWindowGrid(t.Grid)
me.Add(win)
var grid *Node
if t.Window != nil {
// deprecate this early hack
win := makeTableWindow(t.Window)
me.Add(win)
win.makeWindowGrid(t.Grid)
}
if t.Parent != nil {
a := new(widget.Action)
a.WidgetType = widget.Grid
a.WidgetId = int(t.Grid.Id)
a.ParentId = int(t.Parent.Id)
a.State.Enable = true
grid = AddNode(a)
}
if grid == nil {
log.Info("tree: makeTable() failed to make grid")
return
}
me.Add(grid)
log.Info("tree: makeTable() finished add win & grid")
var h int = 0