From ed315852c49e9a28dc7061ecc64f221301a59e57 Mon Sep 17 00:00:00 2001 From: Jacob Date: Sat, 6 Jan 2024 11:00:00 +0100 Subject: [PATCH] Minor optimization to widget.Entry --- widget/entry.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/widget/entry.go b/widget/entry.go index e943a8fe52..2f7475613e 100644 --- a/widget/entry.go +++ b/widget/entry.go @@ -1864,8 +1864,9 @@ func (r *entryContentRenderer) Refresh() { r.moveCursor() for _, selection := range selections { - selection.(*canvas.Rectangle).Hidden = !r.content.entry.focused - selection.(*canvas.Rectangle).FillColor = theme.SelectionColor() + rect := selection.(*canvas.Rectangle) + rect.Hidden = !r.content.entry.focused + rect.FillColor = theme.SelectionColor() } canvas.Refresh(r.content)