check if the table is already here
This commit is contained in:
parent
55d4441668
commit
281899055d
|
@ -37,6 +37,7 @@ type TreeInfo struct {
|
|||
ShowTable func(*guipb.Table) // attempt at sending a whole table
|
||||
// NodeI interface{} // is an interface useful here?
|
||||
// NodeAction func(*Node, widget.ActionType) // deprecate
|
||||
currentTables []*guipb.Table
|
||||
}
|
||||
|
||||
type Node struct {
|
||||
|
|
11
table.go
11
table.go
|
@ -42,6 +42,17 @@ func (me *TreeInfo) doTable(a widget.Action) {
|
|||
// }
|
||||
// dumpTable(t)
|
||||
// me.ShowTable(t)
|
||||
log.Info("TREE FOUND TABLE UUID", t.Uuid)
|
||||
for i, ot := range me.currentTables {
|
||||
log.Info("TREE already has UUID", i, ot.Uuid)
|
||||
if t.Uuid == ot.Uuid {
|
||||
log.Info("TREE found UUID! update table here", i, ot.Uuid)
|
||||
log.Info("todo: compare table here...")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
me.currentTables = append(me.currentTables, t)
|
||||
me.makeTable(t)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue