tweaks to how we change to a different song
This commit is contained in:
parent
f1b4ac495e
commit
28958721f2
2 changed files with 28 additions and 27 deletions
|
@ -237,7 +237,7 @@ ColumnLayout {
|
||||||
implicitWidth: libraryList.width
|
implicitWidth: libraryList.width
|
||||||
height: selectedLibrary == libraryType ? 50 : 0
|
height: selectedLibrary == libraryType ? 50 : 0
|
||||||
clip: true
|
clip: true
|
||||||
label: title
|
label: index + " " + title
|
||||||
subtitle: {
|
subtitle: {
|
||||||
if (libraryType == "song")
|
if (libraryType == "song")
|
||||||
author
|
author
|
||||||
|
|
|
@ -478,7 +478,7 @@ Item {
|
||||||
|
|
||||||
function newSong(index) {
|
function newSong(index) {
|
||||||
clearSlides();
|
clearSlides();
|
||||||
thisSong = songProxyModel.getSong(index);
|
let thisSong = songProxyModel.getSong(index);
|
||||||
songEditorModel.title = thisSong.title;
|
songEditorModel.title = thisSong.title;
|
||||||
songEditorModel.lyrics = thisSong.lyrics;
|
songEditorModel.lyrics = thisSong.lyrics;
|
||||||
songEditorModel.author = thisSong.author;
|
songEditorModel.author = thisSong.author;
|
||||||
|
@ -492,43 +492,44 @@ Item {
|
||||||
songEditorModel.font = thisSong.font;
|
songEditorModel.font = thisSong.font;
|
||||||
songEditorModel.fontSize = thisSong.fontSize;
|
songEditorModel.fontSize = thisSong.fontSize;
|
||||||
|
|
||||||
changeSlideHAlignment("Center");
|
updateHorizontalTextAlignment("Center");
|
||||||
changeSlideVAlignment("Center");
|
updateVerticalTextAlignment("Center");
|
||||||
changeSlideFont("Noto Sans", true);
|
updateFont("Noto Sans");
|
||||||
changeSlideFontSize(50, true)
|
updateFontSize(50);
|
||||||
changeSlideText(songProxyModel.modelIndex(index).row);
|
updateLyrics("Lyrics");
|
||||||
songList.loadVideo();
|
songList.loadVideo();
|
||||||
console.log("New song with ID: " + song.id);
|
console.log("New song with ID: " + song.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeSong(index) {
|
function changeSong(index) {
|
||||||
if (songProxyModel.songModel.count === index)
|
console.log("Preparing to change song: " + index + 1 + " out of " + songProxyModel.songModel.count());
|
||||||
|
if (songProxyModel.songModel.count() - 1 === index)
|
||||||
newSong(index)
|
newSong(index)
|
||||||
else {
|
else {
|
||||||
clearSlides();
|
clearSlides();
|
||||||
const updatedSong = songProxyModel.getSong(index);
|
const updatedSong = songProxyModel.getSong(index);
|
||||||
console.log(updatedSong.vorder + " " + updatedSong.title + " " + updatedSong.audio);
|
console.log(updatedSong.vorder + " " + updatedSong.title + " " + updatedSong.audio);
|
||||||
songEditorModel.title = updatedSong.title;
|
song.title = updatedSong.title;
|
||||||
songEditorModel.lyrics = updatedSong.lyrics;
|
song.lyrics = updatedSong.lyrics;
|
||||||
songEditorModel.author = updatedSong.author;
|
song.author = updatedSong.author;
|
||||||
songEditorModel.ccli = updatedSong.ccli;
|
song.ccli = updatedSong.ccli;
|
||||||
songEditorModel.audio = updatedSong.audio;
|
song.audio = updatedSong.audio;
|
||||||
songEditorModel.verseOrder = updatedSong.vorder;
|
song.verseOrder = updatedSong.vorder;
|
||||||
songEditorModel.background = updatedSong.background;
|
song.background = updatedSong.background;
|
||||||
songEditorModel.backgroundType = updatedSong.backgroundType;
|
song.backgroundType = updatedSong.backgroundType;
|
||||||
songEditorModel.horizontalTextAlignment = updatedSong.horizontalTextAlignment;
|
song.horizontalTextAlignment = updatedSong.horizontalTextAlignment;
|
||||||
songEditorModel.verticalTextAlignment = updatedSong.verticalTextAlignment;
|
song.verticalTextAlignment = updatedSong.verticalTextAlignment;
|
||||||
songEditorModel.font = updatedSong.font;
|
song.font = updatedSong.font;
|
||||||
songEditorModel.fontSize = updatedSong.fontSize;
|
song.fontSize = updatedSong.fontSize;
|
||||||
songEditorModel.checkVerseOrder();
|
song.checkVerseOrder();
|
||||||
songIndex = updatedSong.id;
|
songIndex = updatedSong.id;
|
||||||
|
|
||||||
changeSlideHAlignment(song.horizontalTextAlignment);
|
/* changeSlideHAlignment(song.horizontalTextAlignment); */
|
||||||
changeSlideVAlignment(song.verticalTextAlignment);
|
/* changeSlideVAlignment(song.verticalTextAlignment); */
|
||||||
changeSlideFont(song.font, true);
|
/* changeSlideFont(song.font, true); */
|
||||||
changeSlideFontSize(song.fontSize, true)
|
/* changeSlideFontSize(song.fontSize, true) */
|
||||||
changeSlideText(songProxyModel.modelIndex(index).row);
|
/* changeSlideText(songProxyModel.modelIndex(index).row); */
|
||||||
console.log("Changing to song: " + song.title + " with ID: " + song.id);
|
console.log("Changing to song: " + song.title + " with ID: " + songIndex);
|
||||||
footerFirstText = "Song: ";
|
footerFirstText = "Song: ";
|
||||||
footerSecondText = song.title;
|
footerSecondText = song.title;
|
||||||
songList.loadVideo();
|
songList.loadVideo();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue