implement phrase_get

This commit is contained in:
🪞👃🪞 2024-10-12 09:25:24 +03:00
parent cae8556c91
commit efdc135cae

View file

@ -300,7 +300,12 @@ impl<E: Engine> Arrangement<E> {
}
pub fn phrase_get (&mut self) {
if let ArrangementFocus::Clip(track, scene) = self.selected {
todo!("phrase_get")
if let Some(phrase) = &self.scenes[scene].clips[track] {
let mut phrases = self.phrases.write().unwrap();
if let Some(index) = phrases.index_of(&*phrase.read().unwrap()) {
phrases.phrase = index;
}
}
}
}
pub fn phrase_next (&mut self) {