gocui: tabs functional now but not perfect

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2023-04-26 13:00:58 -05:00
parent e750b06831
commit d67c7b2635
2 changed files with 5 additions and 2 deletions

View File

@ -35,7 +35,6 @@ func (w *cuiWidget) doWidgetClick() {
me.rootNode.nextW = 0
me.rootNode.nextH = 0
me.rootNode.redoTabs(true)
w.isCurrent = true
if w.hasTabs {
@ -45,6 +44,7 @@ func (w *cuiWidget) doWidgetClick() {
break
}
}
me.rootNode.redoTabs(true)
w.placeWidgets()
w.showWidgets()

View File

@ -126,7 +126,10 @@ func (w *cuiWidget) redoTabs(draw bool) {
if (w.widgetType == toolkit.Tab) {
w.setTabWH()
w.deleteView()
w.showView()
// show all the tabs for the current window
if w.parent.isCurrent {
w.showView()
}
}
for _, child := range w.children {