mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
auto redraw phrase on create editor
This commit is contained in:
parent
326507f400
commit
72dd3756db
2 changed files with 5 additions and 2 deletions
|
|
@ -34,7 +34,7 @@ from_jack!(|jack| ArrangerTui {
|
|||
color: TuiTheme::bg().into(),
|
||||
mode: ArrangerMode::V(1),
|
||||
size: Measure::new(),
|
||||
splits: [16, 20],
|
||||
splits: [12, 20],
|
||||
midi_buf: vec![vec![];65536],
|
||||
note_buf: vec![],
|
||||
perf: PerfModel::default(),
|
||||
|
|
|
|||
|
|
@ -210,7 +210,9 @@ impl PhraseEditorModel {
|
|||
|
||||
impl From<&Arc<RwLock<Phrase>>> for PhraseEditorModel {
|
||||
fn from (phrase: &Arc<RwLock<Phrase>>) -> Self {
|
||||
Self::from(Some(phrase.clone()))
|
||||
let mut model = Self::from(Some(phrase.clone()));
|
||||
model.redraw();
|
||||
model
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -218,6 +220,7 @@ impl From<Option<Arc<RwLock<Phrase>>>> for PhraseEditorModel {
|
|||
fn from (phrase: Option<Arc<RwLock<Phrase>>>) -> Self {
|
||||
let mut model = Self::default();
|
||||
*model.phrase_mut() = phrase;
|
||||
model.redraw();
|
||||
model
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue