Skip to content

Commit

Permalink
Reset cache consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Feb 27, 2024
1 parent 98bd384 commit e2cb641
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion container.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ func (c *Container) Position() Position {

// Refresh causes this object to be redrawn in it's current state
func (c *Container) Refresh() {
c.minCache = Size{}

c.layout()

for _, child := range c.Objects {
Expand All @@ -129,7 +131,6 @@ func (c *Container) Refresh() {
return
}
o.Refresh(c)
c.minCache = Size{}
}

// Remove updates the contents of this container to no longer include the specified object.
Expand Down
3 changes: 2 additions & 1 deletion internal/widget/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ func (w *Base) Refresh() {
return
}

w.minCache.Store(fyne.Size{})

render := cache.Renderer(impl)
render.Refresh()
w.minCache.Store(fyne.Size{})
}

// super will return the actual object that this represents.
Expand Down

0 comments on commit e2cb641

Please sign in to comment.