PhraseCommand -> MidiEditCommand

This commit is contained in:
🪞👃🪞 2025-01-02 13:35:35 +01:00
parent 7f55c3bfc8
commit 57158d4d6f
4 changed files with 15 additions and 15 deletions

View file

@ -2,7 +2,7 @@ use crate::*;
use ClockCommand::{Play, Pause};
use KeyCode::{Tab, Char};
use SequencerCommand as Cmd;
use PhraseCommand::*;
use MidiEditCommand::*;
use PhrasePoolCommand::*;
/// Root view for standalone `tek_sequencer`.
pub struct SequencerTui {
@ -95,7 +95,7 @@ handle!(<Tui>|self:SequencerTui,input|SequencerCommand::execute_with_state(self,
History(isize),
Clock(ClockCommand),
Pool(PoolCommand),
Editor(PhraseCommand),
Editor(MidiEditCommand),
Enqueue(Option<Arc<RwLock<MidiClip>>>),
}
input_to_command!(SequencerCommand: <Tui>|state: SequencerTui, input|match input.event() {
@ -133,7 +133,7 @@ input_to_command!(SequencerCommand: <Tui>|state: SequencerTui, input|match input
},
// For the rest, use the default keybindings of the components.
// The ones defined above supersede them.
_ => if let Some(command) = PhraseCommand::input_to_command(&state.editor, input) {
_ => if let Some(command) = MidiEditCommand::input_to_command(&state.editor, input) {
Cmd::Editor(command)
} else if let Some(command) = PoolCommand::input_to_command(&state.phrases, input) {
Cmd::Pool(command)