diff options
| author | Jeff Carr <[email protected]> | 2025-02-21 15:50:46 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-21 15:50:46 -0600 |
| commit | 878f55cfcb01b6d5338199a47485f9bc704d33ed (patch) | |
| tree | 0e767cb4902a8fe8747e79d7acdc0db36a4ed280 /table.go | |
| parent | 34b0c787c33090992a96aec9bdacdf052925d515 (diff) | |
this actually worked?
Diffstat (limited to 'table.go')
| -rw-r--r-- | table.go | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -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 |
