mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +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)> {
|
pub fn ppqs (scenes: &[Self], factor: usize) -> Vec<(usize, usize)> {
|
||||||
let mut total = 0;
|
let mut total = 0;
|
||||||
if factor == 0 {
|
if factor == 0 {
|
||||||
let mut scenes: Vec<(usize, usize)> = scenes.iter().map(|scene|{
|
scenes.iter().map(|scene|{
|
||||||
let pulses = scene.pulses().max(PPQ);
|
let pulses = scene.pulses().max(PPQ);
|
||||||
total = total + pulses;
|
total = total + pulses;
|
||||||
(pulses, total - pulses)
|
(pulses, total - pulses)
|
||||||
}).collect();
|
}).collect()
|
||||||
scenes.push((0, total));
|
|
||||||
scenes
|
|
||||||
} else {
|
} else {
|
||||||
let scenes: Vec<(usize, usize)> = (0..=scenes.len()).map(|i|{
|
(0..=scenes.len()).map(|i|{
|
||||||
(factor*PPQ, factor*PPQ*i)
|
(factor*PPQ, factor*PPQ*i)
|
||||||
}).collect::<Vec<_>>();
|
}).collect()
|
||||||
scenes
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn longest_name (scenes: &[Self]) -> usize {
|
pub fn longest_name (scenes: &[Self]) -> usize {
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ impl Content for ArrangerStatusBar {
|
||||||
.bold(true);
|
.bold(true);
|
||||||
let commands = match self {
|
let commands = match self {
|
||||||
Self::ArrangementMix => command(&[
|
Self::ArrangementMix => command(&[
|
||||||
|
["", "c", "olor"],
|
||||||
["", ",.", "scale rows"],
|
["", ",.", "scale rows"],
|
||||||
["", "<>", "resize view"],
|
["", "<>", "resize view"],
|
||||||
]),
|
]),
|
||||||
|
|
@ -271,7 +272,7 @@ impl<'a> Content for VerticalArranger<'a, Tui> {
|
||||||
}))?;
|
}))?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}).bg(bg).border(border)
|
}).bg(bg).grow_y(1).border(border)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
impl<'a> Content for HorizontalArranger<'a, Tui> {
|
impl<'a> Content for HorizontalArranger<'a, Tui> {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue