From 864039adb4fc25a2ee26e5b9acf160162ad540ab Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 16 Sep 2025 17:35:23 -0500 Subject: handle AnyCols() --- table.go | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'table.go') diff --git a/table.go b/table.go index eac6fd9..665ec90 100644 --- a/table.go +++ b/table.go @@ -149,7 +149,7 @@ func (parent *Node) numberTableGrid(pb *guipb.Table) { if parent.numberTableCol(pb, name, w) { // log.Info("tree:row() COLUMN GOOD", t.Title, name, w, h) } else { - log.Info("tree:row() COLOMN FAIL", pb.Title, name, w, h) + log.Info("tree:row() COLUMN FAIL", pb.Title, name, w, h) } w += 1 @@ -238,6 +238,26 @@ func (parent *Node) numberTableCol(pb *guipb.Table, name string, w int) bool { return true } + for _, r := range pb.AnyCols { + if name != r.Header.Name { + // log.Info("skip string row:", r.Header.Name, "!=", name) + continue + } + // log.Info("tree: Add()ing to grid here", r.Header.Id, r.Header.Name, w, h) + r.Header.Location = new(guipb.Location) + r.Header.Location.X = int64(w) + r.Header.Location.Y = int64(h) + h += 1 + for _, v := range r.Widgets { + // log.Info("tree: Add()ing to grid here", v.Id, v.Name, w, h) + v.Location = new(guipb.Location) + v.Location.X = int64(w) + v.Location.Y = int64(h) + h += 1 + } + return true + } + return false } -- cgit v1.2.3