mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-02-21 16:29:04 +01:00
This commit is contained in:
parent
a4ae1d9b02
commit
4569e6d3f8
5 changed files with 14 additions and 7 deletions
2
deps/dizzle
vendored
2
deps/dizzle
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit 89c436dff4caa7b09f06f58d47a750554be2abd5
|
Subproject commit 361874ff72b19d2386f3cb6e8604e673c02203c9
|
||||||
2
deps/tengri
vendored
2
deps/tengri
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit f3fcf663a8fed20a59503d94061ad8b7f8c38486
|
Subproject commit eaa05b7f091b9f22572a9ff98c6739b5c273066b
|
||||||
|
|
@ -40,8 +40,12 @@ impl std::fmt::Debug for MidiEditor {
|
||||||
f.debug_struct("MidiEditor").field("mode", &self.mode).finish()
|
f.debug_struct("MidiEditor").field("mode", &self.mode).finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
from!(|clip: &Arc<RwLock<MidiClip>>|MidiEditor = { let model = Self::from(Some(clip.clone())); model.redraw(); model });
|
from!(MidiEditor: |clip: &Arc<RwLock<MidiClip>>| {
|
||||||
from!(|clip: Option<Arc<RwLock<MidiClip>>>|MidiEditor = {
|
let model = Self::from(Some(clip.clone()));
|
||||||
|
model.redraw();
|
||||||
|
model
|
||||||
|
});
|
||||||
|
from!(MidiEditor: |clip: Option<Arc<RwLock<MidiClip>>>| {
|
||||||
let mut model = Self::default();
|
let mut model = Self::default();
|
||||||
*model.clip_mut() = clip;
|
*model.clip_mut() = clip;
|
||||||
model.redraw();
|
model.redraw();
|
||||||
|
|
|
||||||
|
|
@ -184,8 +184,11 @@ pub trait HasClips {
|
||||||
}
|
}
|
||||||
has_clips!(|self: Pool|self.clips);
|
has_clips!(|self: Pool|self.clips);
|
||||||
has_clip!(|self: Pool|self.clips().get(self.clip_index()).map(|c|c.clone()));
|
has_clip!(|self: Pool|self.clips().get(self.clip_index()).map(|c|c.clone()));
|
||||||
from!(|clip:&Arc<RwLock<MidiClip>>|Pool = {
|
from!(Pool: |clip:&Arc<RwLock<MidiClip>>|{
|
||||||
let model = Self::default(); model.clips.write().unwrap().push(clip.clone()); model.clip.store(1, Relaxed); model
|
let model = Self::default();
|
||||||
|
model.clips.write().unwrap().push(clip.clone());
|
||||||
|
model.clip.store(1, Relaxed);
|
||||||
|
model
|
||||||
});
|
});
|
||||||
impl Pool {
|
impl Pool {
|
||||||
fn _todo_usize_ (&self) -> usize { todo!() }
|
fn _todo_usize_ (&self) -> usize { todo!() }
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ pub struct MidiRangeModel {
|
||||||
pub note_lo: Arc<AtomicUsize>,
|
pub note_lo: Arc<AtomicUsize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
from!(|data:(usize, bool)|MidiRangeModel = Self {
|
from!(MidiRangeModel: |data:(usize, bool)| Self {
|
||||||
time_len: Arc::new(0.into()),
|
time_len: Arc::new(0.into()),
|
||||||
note_axis: Arc::new(0.into()),
|
note_axis: Arc::new(0.into()),
|
||||||
note_lo: Arc::new(0.into()),
|
note_lo: Arc::new(0.into()),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue