Skip to content

Commit

Permalink
textcore: important fix for all-span ("wide") splits setting logic
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoreilly committed Mar 6, 2025
1 parent c30429b commit aae1453
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/splits.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ func (sl *Splits) Init() {
// as there are children, though fewer could be passed.
func (sl *Splits) SetSplits(splits ...float32) *Splits {
sl.updateSplits()
ntc, _ := sl.tilesTotal()
if ntc == 0 {
_, hasNonSpans := sl.tilesTotal()
if !hasNonSpans {
nc := len(splits)
sl.TileSplits = slicesx.SetLength(sl.TileSplits, nc)
copy(sl.TileSplits, splits)
Expand Down

0 comments on commit aae1453

Please sign in to comment.