From 780662b712d13fcacd683aee4e7e9ce43a6c82a8 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 18 May 2026 11:40:37 -0500 Subject: [PATCH] [fix] title and author not changing when switching songs --- src/ui/song_editor.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/ui/song_editor.rs b/src/ui/song_editor.rs index e2b9ebe..2d1d093 100755 --- a/src/ui/song_editor.rs +++ b/src/ui/song_editor.rs @@ -1152,13 +1152,19 @@ impl SongEditor { .. } = theme::spacing(); - let title_input = text_input("song", &self.title) - .on_input(Message::ChangeTitle) - .label("Song Title"); + let title_input = + text_input("song", self.song.as_ref().map_or("", |song| &song.title)) + .on_input(Message::ChangeTitle) + .label("Song Title"); - let author_input = text_input("author", &self.author) - .on_input(Message::ChangeAuthor) - .label("Song Author"); + let author_input = text_input( + "author", + self.song + .as_ref() + .map_or("", |song| song.author.as_ref().map_or("", |v| v)), + ) + .on_input(Message::ChangeAuthor) + .label("Song Author"); let top_input_row = row![title_input, author_input].spacing(space_m);