Fixed Space() causing panics during size calculations.
This commit is contained in:
parent
2963b2217a
commit
1dd344b2f8
4
grid.go
4
grid.go
|
@ -188,7 +188,11 @@ _=ymargin
|
||||||
if current != nil { // connect first left to first right
|
if current != nil { // connect first left to first right
|
||||||
current.neighbor = c
|
current.neighbor = c
|
||||||
}
|
}
|
||||||
|
if len(as) != 0 {
|
||||||
current = as[0] // next left is first subwidget
|
current = as[0] // next left is first subwidget
|
||||||
|
} else {
|
||||||
|
current = nil // spaces don't have allocation data
|
||||||
|
}
|
||||||
allocations = append(allocations, as...)
|
allocations = append(allocations, as...)
|
||||||
x += g.colwidths[col]
|
x += g.colwidths[col]
|
||||||
}
|
}
|
||||||
|
|
4
stack.go
4
stack.go
|
@ -133,7 +133,11 @@ _=ymargin
|
||||||
if current != nil { // connect first left to first right
|
if current != nil { // connect first left to first right
|
||||||
current.neighbor = c
|
current.neighbor = c
|
||||||
}
|
}
|
||||||
|
if len(as) != 0 {
|
||||||
current = as[0] // next left is first subwidget
|
current = as[0] // next left is first subwidget
|
||||||
|
} else {
|
||||||
|
current = nil // spaces don't have allocation data
|
||||||
|
}
|
||||||
}
|
}
|
||||||
allocations = append(allocations, as...)
|
allocations = append(allocations, as...)
|
||||||
if s.orientation == horizontal {
|
if s.orientation == horizontal {
|
||||||
|
|
Loading…
Reference in New Issue