mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
arranger: spawning clips once again!1
This commit is contained in:
parent
b663c53b0a
commit
48603e4812
6 changed files with 41 additions and 18 deletions
|
|
@ -18,6 +18,20 @@ handle!(TuiIn: |self: App, input|Ok(if let Some(command) = self.config.keys.comm
|
|||
}));
|
||||
|
||||
#[tengri_proc::command(App)] impl AppCommand {
|
||||
fn edit (app: &mut App) -> Perhaps<Self> {
|
||||
let selection = app.selection().clone();
|
||||
Ok(match selection {
|
||||
Selection::TrackClip { track, scene } => {
|
||||
let clip = &mut app.scenes_mut()[scene].clips[track];
|
||||
if clip.is_none() {
|
||||
*clip = Some(Default::default());
|
||||
}
|
||||
app.editor = clip.as_ref().map(|c|c.into());
|
||||
None
|
||||
}
|
||||
_ => None
|
||||
})
|
||||
}
|
||||
fn dialog (app: &mut App, dialog: Option<Dialog>) -> Perhaps<Self> {
|
||||
app.toggle_dialog(dialog);
|
||||
Ok(None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue