diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-06-11 20:13:02 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-06-11 20:13:02 -0400 |
commit | dc90be24de569a6de1222c6ebbc659814a49d0a2 (patch) | |
tree | e6f417c467d62da24056625eea858cacd26a507e /lib/ui | |
parent | 6728a11fdf863f7a33eb14e84421b828ab28c09f (diff) | |
download | aerc-dc90be24de569a6de1222c6ebbc659814a49d0a2.tar.gz |
Fix tab invalidation bugs
Diffstat (limited to 'lib/ui')
-rw-r--r-- | lib/ui/tab.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ui/tab.go b/lib/ui/tab.go index 107ff5d6..f18b0ac2 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)) { |