diff --git a/crates/app/src/api.rs b/crates/app/src/api.rs index acdadca6..23e584b3 100644 --- a/crates/app/src/api.rs +++ b/crates/app/src/api.rs @@ -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 { - 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() { - //app.clip_auto_create(); - *clip = Some(Default::default()); + app.project.editor = if app.project.editor.is_some() { + None + } else { + let selection = app.selection().clone(); + 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()); + } + clip.as_ref().map(|c|c.into()) + } + _ => { + None } - app.project.editor = clip.as_ref().map(|c|c.into()); - None } - _ => None - }) + }; + Ok(None) } fn dialog (app: &mut App, dialog: Option) -> Perhaps { app.toggle_dialog(dialog); diff --git a/crates/device/src/arranger/arranger_view.rs b/crates/device/src/arranger/arranger_view.rs index 47a1a64e..a08ceddb 100644 --- a/crates/device/src/arranger/arranger_view.rs +++ b/crates/device/src/arranger/arranger_view.rs @@ -2,6 +2,7 @@ use crate::*; impl Content for Arrangement { fn content (&self) -> impl Render { + 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);