Feat: UI / UX fixes

This commit is contained in:
2026-02-26 21:17:53 +01:00
parent f618f47811
commit 6b56655661
20 changed files with 268 additions and 169 deletions

View File

@@ -131,6 +131,7 @@ pub enum SeqCommand {
length: usize,
},
StopAll,
RestartAll,
ResetScriptState,
Shutdown,
}
@@ -712,6 +713,23 @@ impl SequencerState {
self.runs_counter.counts.clear();
self.audio_state.flush_midi_notes = true;
}
SeqCommand::RestartAll => {
for active in self.audio_state.active_patterns.values_mut() {
active.step_index = 0;
active.iter = 0;
}
self.audio_state.prev_beat = -1.0;
self.script_frontier = -1.0;
self.script_step = 0;
self.script_trace = None;
self.variables.store(Arc::new(HashMap::new()));
self.dict.lock().clear();
self.speed_overrides.clear();
self.script_engine.clear_global_params();
self.runs_counter.counts.clear();
Arc::make_mut(&mut self.step_traces).clear();
self.audio_state.flush_midi_notes = true;
}
SeqCommand::ResetScriptState => {
// Clear shared state instead of replacing - preserves sharing with app
self.variables.store(Arc::new(HashMap::new()));