mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
arranger: editor now toggles
This commit is contained in:
parent
b0393184fa
commit
4f3a50f2d6
2 changed files with 18 additions and 11 deletions
|
|
@ -19,19 +19,25 @@ 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> {
|
||||
app.project.editor = if app.project.editor.is_some() {
|
||||
None
|
||||
} else {
|
||||
let selection = app.selection().clone();
|
||||
Ok(match selection {
|
||||
match selection {
|
||||
Selection::TrackClip { track, scene } => {
|
||||
let clip = &mut app.scenes_mut()[scene].clips[track];
|
||||
if clip.is_none() {
|
||||
//app.clip_auto_create();
|
||||
*clip = Some(Default::default());
|
||||
}
|
||||
app.project.editor = clip.as_ref().map(|c|c.into());
|
||||
clip.as_ref().map(|c|c.into())
|
||||
}
|
||||
_ => {
|
||||
None
|
||||
}
|
||||
_ => None
|
||||
})
|
||||
}
|
||||
};
|
||||
Ok(None)
|
||||
}
|
||||
fn dialog (app: &mut App, dialog: Option<Dialog>) -> Perhaps<Self> {
|
||||
app.toggle_dialog(dialog);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ use crate::*;
|
|||
|
||||
impl Content<TuiOut> for Arrangement {
|
||||
fn content (&self) -> impl Render<TuiOut> {
|
||||
panic!();
|
||||
let ins = |x|Bsp::n(self.view_inputs_0(), x);
|
||||
let tracks = |x|Bsp::s(self.view_tracks_0(), x);
|
||||
let devices = |x|Bsp::s(self.view_devices_0(), x);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue