auto create phrase

This commit is contained in:
🪞👃🪞 2024-10-21 02:34:49 +03:00
parent 059b4c0aa8
commit 7aad6d1678
2 changed files with 7 additions and 3 deletions

View file

@ -143,6 +143,10 @@ impl<E: Engine> Arranger<E> {
}
/// Focus the editor with the current phrase
pub fn edit_phrase (&mut self) {
if self.arrangement.phrase().is_none() {
self.phrases.write().unwrap().append_new(None, None);
self.arrangement.phrase_put();
}
self.show_phrase();
self.focus(ArrangerFocus::PhraseEditor);
}