This commit is contained in:
2026-01-20 02:11:51 +01:00
parent 4391995eae
commit ce0014020f
16 changed files with 941 additions and 595 deletions

View File

@@ -33,8 +33,8 @@ fn render_banks(frame: &mut Frame, app: &App, area: Rect) {
let banks_with_playback: Vec<usize> = app
.slot_data
.iter()
.filter(|(active, _, _)| *active)
.map(|(_, bank, _)| *bank)
.filter(|s| s.active)
.map(|s| s.bank)
.collect();
let bank_names: Vec<Option<&str>> = app
@@ -44,7 +44,7 @@ fn render_banks(frame: &mut Frame, app: &App, area: Rect) {
.map(|b| b.name.as_deref())
.collect();
render_grid(frame, inner, app.patterns_cursor, app.edit_bank, &banks_with_playback, &bank_names);
render_grid(frame, inner, app.patterns_cursor, app.editor_ctx.bank, &banks_with_playback, &bank_names);
}
fn render_patterns(frame: &mut Frame, app: &App, area: Rect, bank: usize) {
@@ -77,12 +77,12 @@ fn render_patterns(frame: &mut Frame, app: &App, area: Rect, bank: usize) {
let playing_patterns: Vec<usize> = app
.slot_data
.iter()
.filter(|(active, b, _)| *active && *b == bank)
.map(|(_, _, pattern)| *pattern)
.filter(|s| s.active && s.bank == bank)
.map(|s| s.pattern)
.collect();
let edit_pattern = if app.edit_bank == bank {
app.edit_pattern
let edit_pattern = if app.editor_ctx.bank == bank {
app.editor_ctx.pattern
} else {
usize::MAX
};