mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
fix missing scene row (how?!)
This commit is contained in:
parent
ec81cbf2f1
commit
ee94df78f6
2 changed files with 6 additions and 8 deletions
|
|
@ -682,18 +682,15 @@ impl Scene {
|
|||
pub fn ppqs (scenes: &[Self], factor: usize) -> Vec<(usize, usize)> {
|
||||
let mut total = 0;
|
||||
if factor == 0 {
|
||||
let mut scenes: Vec<(usize, usize)> = scenes.iter().map(|scene|{
|
||||
scenes.iter().map(|scene|{
|
||||
let pulses = scene.pulses().max(PPQ);
|
||||
total = total + pulses;
|
||||
(pulses, total - pulses)
|
||||
}).collect();
|
||||
scenes.push((0, total));
|
||||
scenes
|
||||
}).collect()
|
||||
} else {
|
||||
let scenes: Vec<(usize, usize)> = (0..=scenes.len()).map(|i|{
|
||||
(0..=scenes.len()).map(|i|{
|
||||
(factor*PPQ, factor*PPQ*i)
|
||||
}).collect::<Vec<_>>();
|
||||
scenes
|
||||
}).collect()
|
||||
}
|
||||
}
|
||||
pub fn longest_name (scenes: &[Self]) -> usize {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue