Skip to content

Commit

Permalink
Merge pull request #5499 from fyne-io/dweymouth-patch-1
Browse files Browse the repository at this point in the history
Fix a bug with previous GridWrap PR
  • Loading branch information
dweymouth authored Feb 5, 2025
2 parents 09ba93b + dbf02fe commit ff83721
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion widget/gridwrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,12 @@ func (l *GridWrap) RefreshItem(id GridWrapItemID) {
// Resize is called when this GridWrap should change size. We refresh to ensure invisible items are drawn.
func (l *GridWrap) Resize(s fyne.Size) {
oldColCount := l.ColumnCount()
oldHeight := l.size.Height
l.colCountCache = 0
l.BaseWidget.Resize(s)
newColCount := l.ColumnCount()

if oldColCount == newColCount && l.size.Height == s.Height {
if oldColCount == newColCount && oldHeight == s.Height {
// no content update needed if resizing only horizontally and col count is unchanged
return
}
Expand Down

0 comments on commit ff83721

Please sign in to comment.