From dc90be24de569a6de1222c6ebbc659814a49d0a2 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 11 Jun 2018 20:13:02 -0400 Subject: Fix tab invalidation bugs --- lib/ui/tab.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/ui/tab.go b/lib/ui/tab.go index 107ff5d..f18b0ac 100644 --- a/lib/ui/tab.go +++ b/lib/ui/tab.go @@ -43,7 +43,9 @@ func (tabs *Tabs) invalidateChild(d Drawable) { for i, tab := range tabs.Tabs { if tab.Content == d { if i == tabs.Selected { - tabs.TabContent.Invalidate() + if tabs.onInvalidateContent != nil { + tabs.onInvalidateContent(tabs.TabContent) + } } return } @@ -107,6 +109,8 @@ func (content *TabContent) Invalidate() { if content.onInvalidateContent != nil { content.onInvalidateContent(content) } + tab := content.Tabs[content.Selected] + tab.Content.Invalidate() } func (content *TabContent) OnInvalidate(onInvalidate func(d Drawable)) { -- cgit 1.4.1-2-gfad0