Fix tab invalidation bugs
This commit is contained in:
parent
6728a11fdf
commit
dc90be24de
1 changed files with 5 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue