summary refs log tree commit diff stats
path: root/lib/ui
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-06-11 20:13:02 -0400
committerDrew DeVault <sir@cmpwn.com>2018-06-11 20:13:02 -0400
commitdc90be24de569a6de1222c6ebbc659814a49d0a2 (patch)
treee6f417c467d62da24056625eea858cacd26a507e /lib/ui
parent6728a11fdf863f7a33eb14e84421b828ab28c09f (diff)
downloadaerc-dc90be24de569a6de1222c6ebbc659814a49d0a2.tar.gz
Fix tab invalidation bugs
Diffstat (limited to 'lib/ui')
-rw-r--r--lib/ui/tab.go6
1 files changed, 5 insertions, 1 deletions
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)) {