Feat: documentation
This commit is contained in:
@@ -17,10 +17,8 @@ pub(super) fn handle_main_page(ctx: &mut InputContext, key: KeyEvent, ctrl: bool
|
||||
ctx.app.panel.visible = false;
|
||||
ctx.app.panel.focus = PanelFocus::Main;
|
||||
} else {
|
||||
if ctx.app.panel.side.is_none() {
|
||||
let state = SampleBrowserState::new(&ctx.app.audio.config.sample_paths);
|
||||
ctx.app.panel.side = Some(SidePanel::SampleBrowser(state));
|
||||
}
|
||||
let state = SampleBrowserState::new(&ctx.app.audio.config.sample_paths);
|
||||
ctx.app.panel.side = Some(SidePanel::SampleBrowser(state));
|
||||
ctx.app.panel.visible = true;
|
||||
ctx.app.panel.focus = PanelFocus::Side;
|
||||
}
|
||||
@@ -127,13 +125,21 @@ pub(super) fn handle_main_page(ctx: &mut InputContext, key: KeyEvent, ctrl: bool
|
||||
if let Some(range) = ctx.app.editor_ctx.selection_range() {
|
||||
let steps: Vec<usize> = range.collect();
|
||||
ctx.dispatch(AppCommand::OpenModal(Modal::Confirm {
|
||||
action: ConfirmAction::DeleteSteps { bank, pattern, steps },
|
||||
action: ConfirmAction::DeleteSteps {
|
||||
bank,
|
||||
pattern,
|
||||
steps,
|
||||
},
|
||||
selected: false,
|
||||
}));
|
||||
} else {
|
||||
let step = ctx.app.editor_ctx.step;
|
||||
ctx.dispatch(AppCommand::OpenModal(Modal::Confirm {
|
||||
action: ConfirmAction::DeleteStep { bank, pattern, step },
|
||||
action: ConfirmAction::DeleteStep {
|
||||
bank,
|
||||
pattern,
|
||||
step,
|
||||
},
|
||||
selected: false,
|
||||
}));
|
||||
}
|
||||
@@ -172,7 +178,11 @@ pub(super) fn handle_main_page(ctx: &mut InputContext, key: KeyEvent, ctrl: bool
|
||||
.and_then(|s| s.name.clone())
|
||||
.unwrap_or_default();
|
||||
ctx.dispatch(AppCommand::OpenModal(Modal::Rename {
|
||||
target: RenameTarget::Step { bank, pattern, step },
|
||||
target: RenameTarget::Step {
|
||||
bank,
|
||||
pattern,
|
||||
step,
|
||||
},
|
||||
name: current_name,
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user