Seed sort weights from cue order instead of input position

This commit is contained in:
Ian Gulliver
2026-02-23 21:04:09 -08:00
parent 389c204e27
commit 7dbc3e8088

View File

@@ -226,8 +226,14 @@ func BuildTimelineDebug(show *Show, debugW io.Writer) (Timeline, error) {
} }
func (tl *Timeline) sortBlocks() []*Block { func (tl *Timeline) sortBlocks() []*Block {
for i, b := range tl.show.Blocks { cueIdx := 0
b.weight = uint64(i) << 32 for _, b := range tl.show.Blocks {
if b.Type == "cue" {
b.weight = uint64(cueIdx+1) << 32
cueIdx++
} else {
b.weight = 0
}
} }
changed := true changed := true