fixing the SongEditor after library changes

This commit is contained in:
Chris Cochrun 2023-03-02 05:57:08 -06:00
parent 3dbecf2301
commit 3cd6a75f4b

View file

@ -321,7 +321,7 @@ Item {
clearSlides(); clearSlides();
song = songProxyModel.songModel.getSong(index); song = songProxyModel.songModel.getSong(index);
console.log(song.lyrics); console.log(song.lyrics);
songIndex = index; songIndex = song.id;
if (song.backgroundType == "image") { if (song.backgroundType == "image") {
slideEditor.videoBackground = ""; slideEditor.videoBackground = "";
@ -345,7 +345,7 @@ Item {
console.log(index); console.log(index);
song = songProxyModel.songModel.getSong(index); song = songProxyModel.songModel.getSong(index);
console.log(song.lyrics); console.log(song.lyrics);
songIndex = index; songIndex = song.id;
if (song.backgroundType == "image") { if (song.backgroundType == "image") {
slideEditor.videoBackground = ""; slideEditor.videoBackground = "";
@ -360,13 +360,13 @@ Item {
changeSlideVAlignment(song.verticalTextAlignment); changeSlideVAlignment(song.verticalTextAlignment);
changeSlideFont(song.font, true); changeSlideFont(song.font, true);
changeSlideFontSize(song.fontSize, true) changeSlideFontSize(song.fontSize, true)
changeSlideText(songIndex); changeSlideText(songProxyModel.modelIndex(index).row);
console.log(song.title); console.log(song.title);
} }
function updateLyrics(lyrics) { function updateLyrics(lyrics) {
songProxyModel.songModel.updateLyrics(songIndex, lyrics); songProxyModel.songModel.updateLyrics(songIndex, lyrics);
songLyrics = lyrics; /* songLyrics = lyrics; */
clearSlides(); clearSlides();
changeSlideText(songIndex); changeSlideText(songIndex);
} }