Panics · P25 Generative: gone choices mark none, overruns peg; seed fields hold seeds through fits, undo and input methods

This commit is contained in:
ZacharyZhang-NY committed 2026-10-07 02:12:07 -04:00
1 parent fb7ee42e3d
commit 68a98198b0
17 files changed
+451 -123

No files matched your search

+5 -8
View File
@@ -80,14 +80,11 @@ impl TTSVoicePicker {
impl RenderOnce for TTSVoicePicker {
fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement {
let known = |key: &Option<SharedString>| {
key.as_ref()
.is_none_or(|key| self.voices.iter().any(|voice| &voice.key == key))
};
assert!(
known(&self.selected) && known(&self.playing),
"a voice named is not listed"
);
for key in [&self.selected, &self.playing].into_iter().flatten() {
if !self.voices.iter().any(|voice| &voice.key == key) {
log::error!("voice picker: voice {key} is not listed; none marked");
}
}
let pickable = self.on_select.is_some();
let focuses: Vec<_> = self
.voices