From f3d85d033675074966e6461bcf637c2611afb154 Mon Sep 17 00:00:00 2001 From: Jacob Date: Tue, 27 Feb 2024 13:35:23 +0100 Subject: [PATCH] Reset cache consistently --- container.go | 3 ++- internal/widget/base.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/container.go b/container.go index 77de7f2a79..cfd8257d07 100644 --- a/container.go +++ b/container.go @@ -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 { @@ -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. diff --git a/internal/widget/base.go b/internal/widget/base.go index a09deb71dd..236f35e045 100644 --- a/internal/widget/base.go +++ b/internal/widget/base.go @@ -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.